Lawson.Zhang

PHP Coding

导航

2015年6月18日 #

centos 卸载PHP

摘要: 阅读全文

posted @ 2015-06-18 16:43 Lawson.Zhang 阅读(138) 评论(0) 推荐(0) 编辑

2015年5月21日 #

centOS7 添加 MySQL 3306端口访问

摘要: vi /etc/my.cnf加上:port = 3306/bin/systemctl restart mysqld.service 阅读全文

posted @ 2015-05-21 16:53 Lawson.Zhang 阅读(333) 评论(0) 推荐(0) 编辑

Laravel 5安装小问题

摘要: 报错:Call to undefined function Illuminate\Foundation\Bootstrap\mb_internal_encoding解决办法:https://github.com/laravel/framework/issues/6891安装mbstring扩展yum... 阅读全文

posted @ 2015-05-21 16:23 Lawson.Zhang 阅读(264) 评论(0) 推荐(0) 编辑

2015年3月25日 #

php目录操作函数

摘要: getcwd() 函数返回当前目录。若成功,则返回当前工作目录,否则返回 false。echo getcwd(); //D:\wamp\www\example\20150325chdir("test"); // 进入当前目录下的test目录echo getcwd(); //D:\wamp\www\e... 阅读全文

posted @ 2015-03-25 16:58 Lawson.Zhang 阅读(169) 评论(0) 推荐(0) 编辑

2015年3月21日 #

html script的async属性

摘要: 一般网页加载的script标签时,没有带async属性,浏览器渲染时会从上至下依次进行,当某一个script解析缓慢会影响后续的网页的渲染,在html5中,带上async标签的script脚本可以在浏览器渲染页面时实行异步加载,会执行先下载js文件同时网页继续渲染。当js文件下载完毕后,在windo... 阅读全文

posted @ 2015-03-21 14:25 Lawson.Zhang 阅读(275) 评论(0) 推荐(0) 编辑

2015年3月18日 #

php引用 =& 详解

摘要: 引用是什么在 PHP 中引用意味着用不同的名字访问同一个变量内容。这并不像 C 的指针,它们是符号表别名。注意在 PHP 中,变量名和变量内容是不一样的,因此同样的内容可以有不同的名字。最接近的比喻是 Unix 的文件名和文件本身 - 变量名是目录条目,而变量内容则是文件本身。引用可以被看作是 Un... 阅读全文

posted @ 2015-03-18 10:50 Lawson.Zhang 阅读(651) 评论(0) 推荐(0) 编辑

php = &

摘要: $a = 12;$b =& $a;echo $b; // 12echo "\n";$b = 23;echo $a; // 23echo "\n";$a = 34;echo $b; // 34echo "\n";$c = test($b);echo $b; // 134echo "\n";echo $... 阅读全文

posted @ 2015-03-18 10:49 Lawson.Zhang 阅读(159) 评论(0) 推荐(0) 编辑

2015年3月10日 #

php验证码

摘要: 1.create_code.php页面 生成验证码:更换-->提交3.验证的页面 act.php随机值存储在session中 验证时通过对比文本框内的值与session 来判断验证码是否正确! 阅读全文

posted @ 2015-03-10 10:02 Lawson.Zhang 阅读(143) 评论(0) 推荐(0) 编辑

消除变量占用内存与session_unset和session_destroy的用法区别

摘要: /*unset与内存释放$test=str_repeat("1",250);//str_repeat()函数,将指定字符串重复多遍$s = memory_get_usage();//该函数用来查看当前所用内存 //$p = &$test;//变量绑定$test = null;//或者unset($... 阅读全文

posted @ 2015-03-10 10:01 Lawson.Zhang 阅读(323) 评论(0) 推荐(0) 编辑

ftp数据写入本地

摘要: function downfile($fileurl){ $filename=$fileurl; $file = fopen($filename, "rb"); Header( "Content-type: ... 阅读全文

posted @ 2015-03-10 09:59 Lawson.Zhang 阅读(311) 评论(0) 推荐(0) 编辑