摘要: //打印日志function debug_log($msg,$level=''){ $logdir=defined('LOGS_PATH')?LOGS_PATH:'/tmp'; $level=strtolower($level); if($level=='' || $level=='debug') 阅读全文
posted @ 2017-01-04 16:17 王君山山 阅读(221) 评论(0) 推荐(0) 编辑
摘要: include("config.php");$redis = new Redis();$redis->connect('127.0.0.1',6379);$redis->auth('518car518'); $list=$db->getResults("select car_brand_type_i 阅读全文
posted @ 2017-01-04 16:15 王君山山 阅读(74) 评论(0) 推荐(0) 编辑
摘要: C:\xampp\php\extras\ssl\cacert.pem ● in your php.ini put this line in this section:;;;;;;;;;;;;;;;;;;;;; php.ini Options ;;;;;;;;;;;;;;;;;;;;; curl.ca 阅读全文
posted @ 2017-01-04 16:14 王君山山 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Header set Access-Control-Allow-Origin "http://www.jl.com" apache配置 在nginx.conf中配置http { ...... add_header Access-Control-Allow-Origin *; add_header A 阅读全文
posted @ 2017-01-04 16:13 王君山山 阅读(116) 评论(0) 推荐(0) 编辑
摘要: https://oneinstack.com/question/lnmp-why-fileinfo-extension/ cd /root/oneinstack/srctar zxvf php-5.6.20.tar.gz # 解压已经安装的php版本cd php-5.6.20/ext/fileinf 阅读全文
posted @ 2017-01-04 16:12 王君山山 阅读(1218) 评论(0) 推荐(0) 编辑
摘要: <?php echo mb_substr($value['top']['description'], 0, 60, 'utf-8'); ?> 阅读全文
posted @ 2017-01-04 16:11 王君山山 阅读(98) 评论(0) 推荐(0) 编辑
摘要: $(function () { $.ajax({ url : 'http://www.che.com/ajax/jsonp/islogin.htm', type : "get", data:'', dataType : "jsonp", jsonp:'callback', async: false, 阅读全文
posted @ 2017-01-04 16:10 王君山山 阅读(142) 评论(0) 推荐(0) 编辑
摘要: $foo = 'hello world!';$foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!';$bar = ucwords($bar); // HELLO WORLD!$bar = ucwords(strtolower($bar) 阅读全文
posted @ 2017-01-04 16:09 王君山山 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 1. echo str_replace("world","John","Hello world!"); 2. Hello John! 阅读全文
posted @ 2017-01-04 16:08 王君山山 阅读(120) 评论(0) 推荐(0) 编辑
摘要: //获取ip地址public static function getIP() { if (@$_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; else if (@$_SERVER["HTTP_CLIEN 阅读全文
posted @ 2017-01-04 16:07 王君山山 阅读(177) 评论(0) 推荐(0) 编辑
摘要: GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; 所有数据库所有表 GRANT ALL PRIVILEGES ON xinchuanbo.* TO 'zzs'@'%' I 阅读全文
posted @ 2017-01-04 16:06 王君山山 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1.创建数据库mysql -uroot -p1234 create database wiki default charset utf8;use wiki;source /your_wiki_sql_file_path/wiki.sql 阅读全文
posted @ 2017-01-04 16:04 王君山山 阅读(1587) 评论(0) 推荐(0) 编辑
摘要: alter table wyx_phome_ecms_advert rename to advert 阅读全文
posted @ 2017-01-04 16:03 王君山山 阅读(178) 评论(0) 推荐(0) 编辑
摘要: echo base_convert(crc32("用户名")%36, 10, 36);结果:0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,i,s,t,u,v,w,x,y,z 阅读全文
posted @ 2017-01-04 16:02 王君山山 阅读(318) 评论(0) 推荐(0) 编辑
摘要: Mysql:is not allowed to connect to this MySQL server如果你想连接你的mysql的时候发生这个错误: ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL ser 阅读全文
posted @ 2017-01-04 16:01 王君山山 阅读(181) 评论(0) 推荐(0) 编辑
摘要: $db->query("insert into tj_count(`first`,`second`,`jumpurl`,`time`,`pvnum`) values('".$redisArr[0]."','".$redisArr[1]."','".$redisArr[2]."',".$dupTime 阅读全文
posted @ 2017-01-04 16:00 王君山山 阅读(732) 评论(0) 推荐(0) 编辑
摘要: $sql="alter table `".$tablename."` add `mac` varchar(30) NOT NULL DEFAULT '' COMMENT 'mac地址',add `brand` varchar(30) NOT NULL DEFAULT '' COMMENT '品牌', 阅读全文
posted @ 2017-01-04 15:59 王君山山 阅读(3545) 评论(0) 推荐(0) 编辑
摘要: delete from article where id in ( select id from (select id from article group by title having count(title) > 1) as a) 阅读全文
posted @ 2017-01-04 15:57 王君山山 阅读(163) 评论(0) 推荐(0) 编辑
摘要: select FROM_UNIXTIME(addtime,'%Y年%m月%d %h:%i:%s') from users 阅读全文
posted @ 2017-01-04 15:55 王君山山 阅读(2689) 评论(0) 推荐(0) 编辑