MySQL server version for the right syntax to use near
遇到这串错误,经查询是因为输入 单双引号未转义导致,解决办法如下
addslashes($sqlkey)
MySQL server version for the right syntax to use near
遇到这串错误,经查询是因为输入 单双引号未转义导致,解决办法如下
addslashes($sqlkey)
create table t5 (id int auto_increment, name varchar(20) primary key, key(id));
来源:http://www.cnblogs.com/A-Song/archive/2011/12/14/2288215.html
#测试网址: http://localhost/blog/testurl.php?id=5 //获取域名或主机地址 echo $_SERVER['HTTP_HOST']."<br>"; #localhost //获取网页地址 echo $_SERVER['PHP_SELF']."<br>"; #/blog/testurl.php //获取网址参数 echo $_SERVER["QUERY_STRING"]."<br>"; #id=5 //获取用户代理 echo $_SERVER['HTTP_REFERER']."<br>"; //获取完整的url echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; #http://localhost/blog/testurl.php?id=5 //包含端口号的完整url echo 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; #http://localhost:80/blog/testurl.php?id=5 //只取路径 $url='http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"]; echo dirname($url); #http://localhost/blog
select column_name,column_comment from information_schema.COLUMNS where table_name = 'capture_config';
result
id | id |
site | 网站 |
page | 页面 |
classify | 类别 |
title | 类别标题 |
rule | 获取规则 |
function is_mobile() { $user_agent = $_SERVER ['HTTP_USER_AGENT']; $mobile_browser = Array ( "mqqbrowser", // 手机QQ浏览器 "opera mobi", // 手机opera "juc", "iuc", // uc浏览器 "fennec", "ios", "applewebKit/420", "applewebkit/525", "applewebkit/532", "ipad", "iphone", "ipaq", "ipod", "iemobile", "windows ce", // windows phone "240×320", "480×640", "acer", "android", "anywhereyougo.com", "asus", "audio", "blackberry", "blazer", "coolpad", "dopod", "etouch", "hitachi", "htc", "huawei", "jbrowser", "lenovo", "lg", "lg-", "lge-", "lge", "mobi", "moto", "nokia", "phone", "samsung", "sony", "symbian", "tablet", "tianyu", "wap", "xda", "xde", "zte" ); $is_mobile = false; foreach ( $mobile_browser as $device ) { if (stristr ( $user_agent, $device )) { $is_mobile = true; break; } } return $is_mobile; }
/* */ SELECT SU.*, AR.* FROM `t_user_role` UR INNER JOIN t_sys_user SU ON UR.uid = SU.t_id INNER JOIN t_sys_auth_role AR ON UR.group_id = AR.id
/* */ <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all </Directory> //修改后 <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory>
/* */ # onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 //修改后 # onlineoffline tag - don't remove Order Deny,Allow Deny from none Allow from all