yipeiwu_com6年前
昨天晚上群里有朋友采集网页时发现file_get_contents 获得的网页保存到本地为乱码,响应的header 里 Content-Encoding:gzip但在浏览器里看是正常的。...
yipeiwu_com6年前
数据结构很重要,算法+数据结构+文档=程序使用PHP描述冒泡排序算法,对象可以是一个数组复制代码 代码如下://冒泡排序(数组排序)function bubble_sort($array...
yipeiwu_com6年前
天气终于晴了,但问题来了。在实现两个站点间用户数据同步,当使用php函数 file_get_contents抓取执行远程页面时,如果连接超时将会输出一个Fatal Error或相当的慢,...
yipeiwu_com6年前
php导入到excel乱码是因为utf8编码在xp系统不支持所有utf8编码转码一下就完美解决了utf-8编码案例Php代码复制代码 代码如下:<?php header("Cont...
yipeiwu_com6年前
复制代码 代码如下:function remote($urls, $name = '', $path = '', $dir = './images/') { if (!is_a...
yipeiwu_com6年前
复制代码 代码如下:function dump($var, $echo=true,$label=null, $strict=true){ $label...
yipeiwu_com6年前
复制代码 代码如下:function Steal($url, $post_data = ""){//$header[] = "Accept: text/vnd.wap.wml,*.*";...
yipeiwu_com6年前
gurl 要下载的图片地址$rfurl 来路。如果目标图像做了防盗链设置,可以绕过。$filename 下载图片保存的文件名,相对路径,不要用realpath$gcookie 调整coo...
yipeiwu_com6年前
数据放入数据库和取出来显示在页面需要注意什么 入库时 $str=addslashes($str); $sql=\"insert into `tab` (`content`) values...
yipeiwu_com6年前
CI默认的rewrite url中是类似这样的,例如你的CI根目录是在/CodeIgniter/下,你的下面的二级url就类似这样http://localhost/CodeIgniter...