随笔分类 -  PHP

PHP
摘要:1 getDeclaringClass()->name;15 16 if (__CLASS__ !== $class) {17 @trigger_error(sprintf('Calling the %s::init() method is deprecat... 阅读全文
posted @ 2015-12-24 14:27 iYunBlog 阅读(102) 评论(0) 推荐(0)
摘要:一、错误信息:1 Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'al... 阅读全文
posted @ 2015-12-10 15:52 iYunBlog 阅读(238) 评论(0) 推荐(0)
摘要:1、connect:1 connect('127.0.0.1', 6379);5 var_dump($result); // boolean true2、set:1 connect('127.0.0.1', 6379);5 $result = $Redis->set('test', date('Y-... 阅读全文
posted @ 2015-10-27 14:13 iYunBlog 阅读(214) 评论(0) 推荐(0)
摘要:一、配置php.ini文件:1 session.save_handler = redis2 session.save_path = "tcp://127.0.0.1:6379"二、设置SESSION信息: 1 1001, 8 'username' => 'admin', 9 'pa... 阅读全文
posted @ 2015-10-27 10:18 iYunBlog 阅读(282) 评论(0) 推荐(0)
摘要:一、gettype($x), empty($x), isset($x), is_null(), if ($x) 检测判断值: 阅读全文
posted @ 2015-08-29 13:23 iYunBlog 阅读(229) 评论(0) 推荐(0)
摘要:1、break, continue, goto, return, exit 跳转循环中的区别:❶、break:实例一: 1 3) { 7 break; // break 1; 8 } 9 $arr[$i][$j] = $sum;10 ... 阅读全文
posted @ 2015-08-29 11:39 iYunBlog 阅读(140) 评论(0) 推荐(1)
摘要:1、echo()、print()、print_r()、var_dump() 和 var_export() 的区别:相同点:❶、笼统的概括为他们都可以输出变量内容不同点:❶、echo():输出一个或者多个字符串或变量值,它是一个语言结构而非函数。因为他不是函数,所以它没有返回值 1 'string'... 阅读全文
posted @ 2015-08-28 21:10 iYunBlog 阅读(198) 评论(0) 推荐(0)
摘要:一、方法一: 1 $value) {11 $flag = $key > 0 || $isFirstLetter;12 $arr[$key] = $flag ? ucfirst($value) : $value;13 }14 return implod... 阅读全文
posted @ 2015-08-28 08:05 iYunBlog 阅读(269) 评论(0) 推荐(0)
摘要:一、使用pathinfo()函数: 1 getExtension();11 }12 $directory = "C:/Users/Yun/Downloads/ace-master.zip";13 print_r(getExtName($directory)); 阅读全文
posted @ 2015-08-24 22:01 iYunBlog 阅读(231) 评论(0) 推荐(0)
摘要:一、使用dir()函数: 1 read()) {12 if ((is_dir("$directory/$file")) && ($file != '.') && ($file != '..')) {13 dirTree("$directory/$file");... 阅读全文
posted @ 2015-08-20 08:48 iYunBlog 阅读(264) 评论(0) 推荐(0)