使用以下方法获取:
$put=file_get_contents('php://input'); $put=json_decode($put,1); foreach ($put as $key => $value) {}
学习日志 LIUGUOFENG
使用以下方法获取:
$put=file_get_contents('php://input'); $put=json_decode($put,1); foreach ($put as $key => $value) {}
PHP 使用 Phantomjs 需开启 proc_open, 本文中使用 PHP 7, ThinkPHP 5, Phantomjs 2.1.1
从错误代码中可以看到是 proc_open 被禁用了。 Continue reading Error when executing PhantomJs procedure – proc_open() has been disabled for security reasons 错误解决
location ~ .+\.php($|/) { fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $root$fastcgi_script_name; include fastcgi_params; }
ThinkPHP 5 部署在了LAMP/LNMP 环境上很有可能出现 Error 500 的情况,这个时候需要开启 php 错误提示来判断是否是因为设置了open_basedir 选项出错。 Continue reading ThinkPHP 5 LNMP PHP 7 环境 服务器 Error 500 错误
# 安装依赖软件 yum -y install wget fontconfig # 下载PhantomJS 64位/32位 wget -P /tmp/ https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 wget -P /tmp/ https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-i686.tar.bz2 # 解压 64位/32位 tar xjf /tmp/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/ tar xjf /tmp/phantomjs-2.1.1-linux-i686.tar.bz2 -C /usr/local/ # 重命名 64位/32位 mv /usr/local/phantomjs-2.1.1-linux-x86_64 /usr/local/phantomjs mv /usr/local/phantomjs-2.1.1-linux-i686 /usr/local/phantomjs # 建立软链接 ln -s /usr/local/phantomjs/bin/phantomjs /usr/bin/
在终端执行phantomjs命令,如果跟我下图的结果一样就表示安装成功了。
index index.html index.php index.htm; location / { #去掉index.php,index 必须在此之上。 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?s=$1 last; break; } }
因为我们不能复制一些文件,升级未被安装。这通常是因为存在不一致的文件权限。
wp-includes/category-template.php 安装失败
$str=preg_replace("/\s+/", " ", $str); //过滤多余回车 $str=preg_replace("/<[ ]+/si","<",$str); //过滤<__("<"号后面带空格) $str=preg_replace("/<\!--.*?-->/si","",$str); //注释 $str=preg_replace("/<(\!.*?)>/si","",$str); //过滤DOCTYPE $str=preg_replace("/<(\/?html.*?)>/si","",$str); //过滤html标签 $str=preg_replace("/<(\/?head.*?)>/si","",$str); //过滤head标签 $str=preg_replace("/<(\/?meta.*?)>/si","",$str); //过滤meta标签 $str=preg_replace("/<(\/?body.*?)>/si","",$str); //过滤body标签 $str=preg_replace("/<(\/?link.*?)>/si","",$str); //过滤link标签 $str=preg_replace("/<(\/?form.*?)>/si","",$str); //过滤form标签 $str=preg_replace("/cookie/si","COOKIE",$str); //过滤COOKIE标签 $str=preg_replace("/<(applet.*?)>(.*?)<(\/applet.*?)>/si","",$str); //过滤applet标签 $str=preg_replace("/<(\/?applet.*?)>/si","",$str); //过滤applet标签 $str=preg_replace("/<(style.*?)>(.*?)<(\/style.*?)>/si","",$str); //过滤style标签 $str=preg_replace("/<(\/?style.*?)>/si","",$str); //过滤style标签 $str=preg_replace("/<(title.*?)>(.*?)<(\/title.*?)>/si","",$str); //过滤title标签 $str=preg_replace("/<(\/?title.*?)>/si","",$str); //过滤title标签 $str=preg_replace("/<(object.*?)>(.*?)<(\/object.*?)>/si","",$str); //过滤object标签 $str=preg_replace("/<(\/?objec.*?)>/si","",$str); //过滤object标签 $str=preg_replace("/<(noframes.*?)>(.*?)<(\/noframes.*?)>/si","",$str); //过滤noframes标签 $str=preg_replace("/<(\/?noframes.*?)>/si","",$str); //过滤noframes标签 $str=preg_replace("/<(i?frame.*?)>(.*?)<(\/i?frame.*?)>/si","",$str); //过滤frame标签 $str=preg_replace("/<(\/?i?frame.*?)>/si","",$str); //过滤frame标签 $str=preg_replace("/<(script.*?)>(.*?)<(\/script.*?)>/si","",$str); //过滤script标签 $str=preg_replace("/<(\/?script.*?)>/si","",$str); //过滤script标签 $str=preg_replace("/javascript/si","Javascript",$str); //过滤script标签 $str=preg_replace("/vbscript/si","Vbscript",$str); //过滤script标签 $str=preg_replace("/on([a-z]+)\s*=/si","On\=",$str); //过滤script标签 $str=preg_replace("/&#/si","&#",$str); //过滤script标签,如javAsCript:alert(