1. 截取GB2312中文字符串 <?php < ?php //截取中文字符串 function mysubstr($str, $start, $len) { $tmp…
<?php class utf8_chinese { private $utf8_gb2312; private $utf8_big5; public function __…
对象复制的由来 为什么对象会有“复制”这个概念,这与PHP5中对象的传值方式是密切相关的,让我们看看下面这段简单的代码 PHP代码 …
有的网页必须登陆才能看到,这个时候想要抓取信息必须在header里面传递cookie值才能获取 1、首先登陆网站,打开firebug就能看到对应的cookie把这些cookie拷贝…
php通过smtp发送邮件需要通过一个类smtp 发邮件的代码如下: require_once 'smtp.php'; ##############################…
function Upload($uploaddir) { $tmp_name =$_FILES['file']['tmp_name']; // 文件上传后得临时文件名 $name…
<?php $array1 = array('OH','CA','NY','HI','CT'); $array2 = array('OH','CA','HI','NY','I…
<?php header('Content-type: image/gif'); $image = imagecreate( 400, 200 ); $red = image…
<?php $url = '[email protected] /* */'; echo ltrim(strstr($url, '@'),'@'); ?>
[PHP]代码 $file = "http://www.xxx.nxxxet/demo/file_exists.zip"; $fileExists = @fil…
[PHP]代码 <?php require('conn.php'); $sql="select title from content order by id des…
php模拟js函数unescape的函数代码操作,解析escape后的数据 [PHP]代码 function unescape($str) { $ret = ''; $len = …
PHP 汉字转拼音源码(GB2312类库,大约支持6000个汉字左右)