易截截图软件、单文件、免安装、纯绿色、仅160KB

php图片处理类:缩略,裁剪,圆角,倾斜

<?php
/*
    图片处理类:缩略,裁剪,圆角,倾斜
*/
class resizeimage
{
   //图片类型
   var $type;
   //实际宽度
   var $width;
   //实际高度
   var $height;
   //改变后的宽度
   var $resize_width;
   //改变后的高度
   var $resize_height;
   //是否裁图
   var $cut;
   //源图象
   var $srcimg;
   //目标图象地址
   var $dstimg;
   //圆角源
   var $corner;
   var $im;
function resizeimage($img, $corner, $wid, $hei,$c, $corner_radius, $angle)
   {
       $this->srcimg = $img;
       $this->corner = $corner;
       $this->resize_width = $wid;
       $this->resize_height = $hei;
       $this->cut = $c;
       $this->corner_radius = $corner_radius;
       $this->angle = $angle;
       //图片的类型
       $this->type = substr(strrchr($this->srcimg,"."),1);
       //初始化图象
       $this->initi_img();
       //目标图象地址
       $this -> dst_img();
       //--
       $this->width = imagesx($this->im);
       $this->height = imagesy($this->im);
       //生成图象
       $this->newimg();
       ImageDestroy ($this->im);
   }
   function newimg()
   {
       //


相关文档:

PHP中的MYSQL常用函数总结

PHP中的MYSQL常用函数总结
1、mysql_connect()-建立数据库连接
格式:
    resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
例:
    $conn = @mysql_connect("localhost", "username", "password") or dir( ......

PHP安装问题:编译安装php5.2.0时出错解决方案

编译安装php5.2.0时出错解决方案
1.错误信息...................如下
checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS ......

PHP截取固定长度字符串函数

<?php   
  
function toFixLen($str,$len){ //固定长度字符串的截取   
  
    if($len>=strlen($str)||!$len) return $str;   
  
    $len-=3;   
  
  ......

PHP实现类似tail命令读取最后n行的方法

原文出自: http://www.hly1980.cn/archives/118.html
需要分析日志时tail命令可是常需要用到的,可惜php内并没有提供类似的方法,所以自己实现了一个。
调用方式为tail($filename, $rows),每次默认读取1024字节作为缓冲,返回字符串数组,文件尾的行靠前(这里的行为和tail有所区别,如果需要以原序返回的请自行调用arr ......

关于php的引用

文档是这么说的:
PHP 的引用允许用两个变量来指向同一个内容。意思是,当这样做时:
<?php
$a
=&
$b
;
?>

这意味着 $a
和 $b

指向了同一个变量。
注: $a
和 $b

在这里是完全相同的,这并不是 $a
指向了 $b

或者相反,而是 $a
和 $b
指向了同一个地方。
所以:
<?ph ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号