当前位置: 首页 > news >正文

安卓手机做网站服务器免费建立小程序网站

安卓手机做网站服务器,免费建立小程序网站,海淀网站建设,九江有哪些免费推广网站这个功能#xff0c;有点类似图片站点分离的操作#xff0c;就是将图片单独架设在一台服务器上#xff0c;有兴趣的朋友#xff0c;好好研究下吧。代码如下#xff1a;复制代码 代码示例:/*** 缩略图片 Linux图片服务器* edit www.jbxue.com*/$picID$_GET[imgID];$picType…这个功能有点类似图片站点分离的操作就是将图片单独架设在一台服务器上有兴趣的朋友好好研究下吧。代码如下复制代码 代码示例:/*** 缩略图片 Linux图片服务器* edit www.jbxue.com*/$picID$_GET[imgID];$picTypes..$_GET[imgType];$picWidth$_GET[ImgWidth];if($picID!){//请求的是小图if($picWidth0){//如果小图存在if(file_exists($picID._.$picWidth.$picTypes)){outputImg($picID._.$picWidth.$picTypes);}else{if(file_exists($picID._0.$picTypes)){//如果不存在小图直接生成小图resizeImg($picID._0.$picTypes,$picWidth,$picWidth,$picID._.$picWidth.$picTypes);//输出outputImg($picID._.$picWidth.$picTypes);}else{//如果大图不存在resizeImg(noDefaultImage.gif,$picWidth,$picWidth,noDefaultImage._.$picWidth..gif);//输出outputImg($picID._.$picWidth.$picTypes);}}}//判断文件是否存在大图if(file_exists($picID._0.$picTypes)){$img_file $picID._0.$picTypes;outputImg($img_file);}else{//如果不存在图片$img_file noDefaultImage.gif;outputImg($img_file);}}//输出图片function outputImg($img_file){$fp fopen($img_file, rb);$content fread($fp, filesize($img_file)); //二进制数据fclose($fp);header(Content-Type: image/gif);echo $content;}/*** 生成缩略图* $srcName----为原图片路径* $newWidth$newHeight----分别缩略图的最大宽高* $newName----为缩略图文件名(含路径)* param string $srcName* param int $newWidth* param int $newHeight* param string $newName* return viod*/function resizeImg($srcName,$newWidth,$newHeight,$newName){if($newName){$nameArrexplode(.,$srcName);$expNamearray_pop($nameArr);$expName$expName;array_push($nameArr,$expName);$newName implode(.,$nameArr);}$info ;$data getimagesize($srcName,$info);switch ($data[2]){case 1:if(!function_exists(imagecreatefromgif)){echo 你的GD库不能使用GIF格式的图片请使用Jpeg或PNG格式返回;exit();}$im ImageCreateFromGIF($srcName);break;case 2:if(!function_exists(imagecreatefromjpeg)){echo 你的GD库不能使用jpeg格式的图片请使用其它格式的图片返回;exit();}$im ImageCreateFromJpeg($srcName);break;case 3:$im ImageCreateFromPNG($srcName);break;}$srcWImageSX($im);$srcHImageSY($im);$newWidthH$newWidth/$newHeight;$srcWH$srcW/$srcH;if($newWidthH$srcWH){$ftoW$newWidth;$ftoH$ftoW*($srcH/$srcW);}else{$ftoH$newHeight;$ftoW$ftoH*($srcW/$srcH);}if($srcW$newWidth||$srcH$newHeight){if(function_exists(imagecreatetruecolor)){$ni ImageCreateTrueColor($ftoW,$ftoH);if($ni) ImageCopyResampled($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH);else{$niImageCreate($ftoW,$ftoH);ImageCopyResized($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH);}}else{$niImageCreate($ftoW,$ftoH);ImageCopyResized($ni,$im,0,0,0,0,$ftoW,$ftoH,$srcW,$srcH);}if(function_exists(imagejpeg)) ImageJpeg($ni,$newName);else ImagePNG($ni,$newName);ImageDestroy($ni);}ImageDestroy($im);}?
http://wiki.neutronadmin.com/news/240006/

相关文章:

  • 石家庄网站推广招聘网页版传奇游戏怎么制作
  • 自主网站企业网站建设开始起步文章
  • 建设工程质量安全监督站官方网站哪里有制作网站服务
  • 泰安集团网站建设百度关键词热度查询工具
  • 网站开发所需要的语言网站安全等级评审在哪里做
  • 山东大学网站设计与建设1m带宽做网站怎么样
  • access做网站数据方法188建站系统源码
  • 有没有免费的网站服务器国内精自品线一区91制片
  • 网站开发学什么语言好wordpress 应用店商
  • 广州网站建设系统十大免费推广平台
  • 做网站找公司怎么找有没有做任务的网站吗
  • 网站建设自助建站企业简述网站开发流程 旅游
  • 明星网站策划书网络运维工程师薪酬
  • 微山网站建设哪家便宜好看的网站设计
  • 网站开发用python吗安阳网站
  • 建设高校图书馆网站的意义佳木斯 两学一做 网站
  • 正规的佛山网站建设价格昆明手机网站建设
  • 邹平建设网站wordpress 禁止索引目录
  • 北京h5网站建设平台it外包服务包括哪些
  • 网站左右箭头素材做定制旅游最好的网站
  • 如何建一个网站多少钱Wordpress搜索html页面
  • 中新生态城建设局门户网站微商怎么做推广
  • 把网站做到wordpress里面去上海第五届进博会
  • 企业网站 asp php能让手机流畅到爆的软件
  • 网站编程源码免费app开发软件多少钱
  • 淘宝网官方网站网络营销策略存在的问题
  • 网站建设公司比较广州番禺区职业技术学校中职
  • 新闻类网站排版网站建设wordpress 搜索 自定义
  • 洛阳网站设计网站建设流程域名注册
  • 音乐网站建设水务行业国企门户网站建设