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

在php图片中输入中文文字解决乱码

代码:
<?php
$im = imagecreatefromjpeg("ok.jpg");
$black = @imagecolorallocate($im, 0,0,0);
$jpgnumid = "这是嵌入到图片的文字,解决了乱码问题,
上面的ok.jpg是同目录下的照片.使用它时,还需要有iconv
模块!也就是说在php.ini里将
[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encoding = ISO-8859-1
iconv.output_encoding = ISO-8859-1
这三行的注释全部去掉! ";
$jpgnumid = @iconv("GB2312","UTF-8",$jpgnumid);
@imagettftext ($im,25,0,0,500,$black,"MissYuan_迷你简菱心.TTF",$jpgnumid);
header("Content-type: image/jpeg");
imagejpeg($im);
imagedestroy($im);
?>


相关文档:

php中session出现warning或note提示 解决方法

方法1:error_reporting (E_ALL ^ E_WARNING);
           session_start();
方法2:error_reporting (E_ALL & ~E_NOTICE);
if (!isset($_SESSION)) {
    session_start();
};
方法3:改php.ini 中error_reporting ......

BMH子串查找算法(PHP实现)

代码interface StringSearchable
{
    public function search($substring, $buffer);
}
class BoyerMooreStringSearch implements StringSearchable
{
    public $substring = null;
    public ......

mysql+php无法连接sql(已解决)

搞了很久。。终于发现原来是权限问题。。
2行命令搞定
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
经典了。。。
魔力私服网页端搞定咯~~ ......

PHP分页方法

$pagesize=10; //设置每一页显示的记录数
$c("localhost","root",""); //连接数据库
$rs=mysql_query("select count(*) from tb_product",$conn); //取得记录总数$rs
$myrow = mysql_fetch_array($rs);
$numrows=$myrow[0];

Ɍ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号