![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
酒比花香
勤能补拙
展开
-
php memcache使用
php memcache操作需要开启插件$memcache = new Memcache;$memcache->connect('localhost', 11211) or die ("Could not connect");$version = $memcache->getVersion();echo "Server's version: ".$versi翻译 2013-04-20 19:01:28 · 702 阅读 · 0 评论 -
Cannot modify header information - headers already sent by (output started at D:\softwares\wamp\wamp
使用header("location:frame.php");方法报错原因是:需要将header(...)之前的空格去掉,或者其他输出的东西去掉,如果他上面include其他文件了,你还要检查其他文件里是否有输出原创 2013-04-22 17:07:13 · 715 阅读 · 0 评论 -
php积累
function msubstr($str,$start,$len){ //$str指的是字符串,$start指的是字符串的起始位置,$len指的是长度。$strlen=$start+$len; //用$strlen存储字符串的总长度(从字符串的起始位置到字符串的总长度)for($i=0;$i //通过for循环语句if(ord(substr($str,$i,1))>0原创 2013-04-15 10:14:56 · 655 阅读 · 0 评论 -
make: ./libtool:命令未找到 make: *** [jcapimin.lo] 错误 127
[root@bogon jpeg-6b]# make; make install./libtool --mode=compile gcc -O2 -I. -c ./jcapimin.cmake: ./libtool:命令未找到make: *** [jcapimin.lo] 错误 127./libtool --mode=compile gcc -转载 2013-04-15 20:25:35 · 4366 阅读 · 0 评论 -
php生成验证码图片
srand((double)microtime()*1000000);$im=imagecreate(45,18);$black=imagecolorallocate($im,0,0,0);$white=imagecolorallocate($im,255,255,255);$gray=imagecolorallocate($im,200,200,200);imagefill(转载 2013-04-16 14:36:29 · 706 阅读 · 0 评论 -
php下载文件
$filename=basename($path);$file=fopen($path,"r");header("Content-type:application/octet-stream");header("Accept-ranges:bytes");header("Accept-length:".filesize($path));header("Content-Dispos原创 2013-04-16 16:28:45 · 542 阅读 · 0 评论 -
php加密专题
1)URL加密 用于防止使用 get()方式提交的url中暴露用户信息;string urlencode(string str);urlencode("首页")?> >首页 2)base64编码加密$pwd= 123;$jiami=base64encode($pwd);echo $pwd;$jiemi=base64decode($jiami);echo原创 2013-04-20 10:31:30 · 574 阅读 · 0 评论 -
mysql备份
数据表备份1)备份SELECT * INTO OUTFILE 'file_name' FROM tb1_name;备份后的文件保存在mysql\...\data\project_name 文件夹下。 恢复LOAD DATA INFILE 'user.sql' REPLACE into table 'talbe_name'; 2)在php中备份string原创 2013-04-20 09:47:28 · 487 阅读 · 0 评论