摘要: vim /etc/profile #加上 export PATH=$PATH:/usr/local/php/bin #保存退出 source /etc/profile php -v 阅读全文
posted @ 2018-11-21 15:24 澔如菸海 阅读(503) 评论(0) 推荐(0) 编辑
摘要: String(字符串) Hash(哈希) List(列表) Set(集合) zset(sorted set:有序集合) 阅读全文
posted @ 2018-11-21 15:22 澔如菸海 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1: 使用PDO对象(对于任何数据库驱动都好用)2: addslashes用于单字节字符串的处理,3: 多字节字符用mysql_real_escape_string吧。 另外对于php手册中get_magic_quotes_gpc的举例: 阅读全文
posted @ 2018-11-21 15:21 澔如菸海 阅读(142) 评论(0) 推荐(0) 编辑
摘要: vim /etc/init.d/nginx vim /etc/init.d/php-fpm 后续处理: 阅读全文
posted @ 2018-11-21 15:19 澔如菸海 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #centos6 查看防火墙状态 service iptables status #iptables:未运行防火墙。 #centos6 开启防火墙: service iptables start #centos6 关闭防火墙: #service iptables stop #centos 7 关闭防火墙 systemctl stop firewalld.service 阅读全文
posted @ 2018-11-21 15:13 澔如菸海 阅读(145) 评论(0) 推荐(0) 编辑
摘要: # centos ip 配置 vim /etc/sysconfig/network-scripts/ifcfg-eth0 # 虚拟机下删除里面的内容 vim /etc/udev/rules.d/70-persistent-net.rules #全部删除:按esc后,然后dG #全部复制:按esc后,然后ggyG 阅读全文
posted @ 2018-11-21 15:09 澔如菸海 阅读(234) 评论(0) 推荐(0) 编辑
摘要: ln -s /usr/local/php5/bin/php /usr/bin/php #php 低版本不能使用php 命令,创建软链接 #phpize 依赖于 phpcli 模式 所以php命令必须能允许才可以 阅读全文
posted @ 2018-11-21 15:07 澔如菸海 阅读(109) 评论(0) 推荐(0) 编辑
摘要: #修改 nginx.conf 文件 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } 阅读全文
posted @ 2018-11-21 15:06 澔如菸海 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1,session 在服务器端,cookie 在客户端(浏览器)2,session 默认被存在在服务器的一个文件里(不是内存)3,session 的运行依赖 session id,而 session id 是存在 cookie 中的,也就是说,如果浏览器禁用了 cookie ,同时 session 阅读全文
posted @ 2018-11-21 15:04 澔如菸海 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 解决多台web服务器共享session的问题,至少有以下三种方法: 一、将本该保存在web服务器磁盘上的session数据保存到cookie中 即用cookie会话机制替代session会话机制,将session数据保存到客户端浏览器的cookie中,这样同一个用户访问同一网站时,无论负载均衡到哪台 阅读全文
posted @ 2018-11-21 15:03 澔如菸海 阅读(705) 评论(0) 推荐(0) 编辑