上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 133 下一页
摘要: //请修改变量p的正则表达式,使他能够匹配str中的姓名 $p = '/name:([\w\s]+)/'; $str = "name:steven jobs"; preg_match($p, $str, $match); print_r($match);Array ( [0] => name:steven jobs [1] => steven jobs ) //?????? 阅读全文
posted @ 2019-11-01 20:52 盘思动 阅读(259) 评论(0) 推荐(0)
摘要: $p = 'http://'; $p = '/'.preg_quote($p, '/').'/'; echo $p;/http\:\/\// 阅读全文
posted @ 2019-11-01 20:31 盘思动 阅读(115) 评论(0) 推荐(0)
摘要: array_slice 分割数组, 效果相当于 substr 类似字符串操作 阅读全文
posted @ 2019-11-01 13:44 盘思动 阅读(135) 评论(0) 推荐(0)
摘要: 然后vim /etc/profile,在最下面添加 export PATH=$PATH: 后面跟上node下bin目录的路径 立即生效 sudo apt-get install nodejs // 安装 OK!安装成功! 阅读全文
posted @ 2019-11-01 09:35 盘思动 阅读(616) 评论(0) 推荐(0)
摘要: <?php class Car { private function __construct() { echo 'object create'; } private static $_object = null; public static function getInstance() { if ( 阅读全文
posted @ 2019-10-31 22:33 盘思动 阅读(352) 评论(0) 推荐(0)
摘要: function test3($i){ echo $i . '<br/>'; if ($i >= 0){ $func = __FUNCTION__; // 外面函数名称变了,不用跟着变 $func($i - 1); } echo $i . '<br/>'; } test3(3); 3 2 1 0 -1 -1 0 1 2 3 阅读全文
posted @ 2019-10-31 21:12 盘思动 阅读(141) 评论(0) 推荐(0)
摘要: Array( [title] => 推荐 [code] => 1) array(3) { [1]=> string(6) "推荐" [3]=> array(2) { // 这里出现很诡异的结果 ["title"]=> string(7) "奇闻2" ["code"]=> int(2) } [4]=> 阅读全文
posted @ 2019-10-31 20:32 盘思动 阅读(191) 评论(0) 推荐(0)
摘要: /usr/local/mysql/bin/mysqld_safe /usr/local/nginx/sbin/nginx -s stop /usr/local/nginx/sbin/nginx 阅读全文
posted @ 2019-10-30 09:06 盘思动 阅读(288) 评论(0) 推荐(0)
摘要: $User = D('User'); $User->query('select * from think_user where status=1'); $User->execute('update think_user set status=1 where id=1'); 阅读全文
posted @ 2019-10-22 13:40 盘思动 阅读(1635) 评论(0) 推荐(0)
摘要: update user_info set user_name = concat(user_name,'呵呵呵') where user_name = '哈哈哈'; 阅读全文
posted @ 2019-10-21 15:57 盘思动 阅读(7237) 评论(0) 推荐(0)
上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 133 下一页