ini_set("display_errors", "On");
error_reporting(E_ALL | E_STRICT);
//记录错误信息至本地
error_log("mobile:$mobile \n", 3, '/tmp/we_vcode.log');
nginx -s reload
/etc/init.d/nginx restart
yum install op-nginx
server {
listen 80;
server_name dev.com;
root /opt/web/dev.com/www;
location / {
root /opt/web/dev.com/www;
index index.html index.htm index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /opt/web/dev.com/www;
}
location ~* ^.+\.(jpg|jpeg|gif|css|js|xml|swf) {
expires max;
}
if (!-e $request_filename) {
rewrite (.*) /index.php;
}
location ~ \.php$ {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /opt/web/dev.com/www$fastcgi_script_name;
include fastcgi_params;
}
}
CClientScript::POS_HEAD
CClientScript::POS_END
$usertag = Yii::app()->request->getParam('usertag');
TT_utf_substr($title_full, 80, false);
页面输出的时候,格式化用户的输入,防止跨站脚本攻击XSS等:
htmlspecialchars