document.getElementsByTagName('body')[0].addEventListener('touchmove', function (e) { e.preventDefault(); });
document.getElementsByTagName('body')[0].addEventListener('touchmove', function (e) { e.preventDefault(); });
create table t5 (id int auto_increment, name varchar(20) primary key, key(id));
这个在手机还挺流畅的
//返回顶部 var sdelay=0; function returnTop() { window.scrollBy(0,-100);//Only for y vertical-axis if(document.body.scrollTop>0) { sdelay= setTimeout('returnTop()',10); } }
http://document.thinkphp.cn/manual_3_2.html#url
简单点说
PATHINFO模式 | 1 | ?localhost/index.php/Home/Index(需要index.php) |
REWRITE模式 | 2 | ??localhost/Home/Index(这样就可以了) |
apache?的?PATHINFO 默认开启
nginx 的?PATHINFO 默认关闭
首先的首先
SSH运行下面的代码
cat > /usr/local/nginx/conf/pathinfo.conf << 'EOF' set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "(.+?\.php)(/.*)") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; EOF
1.thinkphp配置文件下定义
'URL_MODEL' => 1,////PATHINFO URL模式
2.修改Linux服务器下?/usr/local/nginx/conf/vhost/网站配置文件
location ~ .*\.php { try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf;//注意,我参考那篇写成 fcgi.conf; 应该是版本不同 include pathinfo.conf; } location /status { stub_status on; access_log off; }
3.修改nginx.conf ?Linux服务器下?/usr/local/nginx/conf/nginx.conf
4.修改php.ini? Linux服务器下?/usr/local/php/etc/php.ini
5.好了,现在可以访问 ? localhost/index.php/Home/Index 了
页面刷新触发
chrome.tabs.onUpdated.addListener( function(tabId,changeInfo,tab){ console.log(tab.url); add_cnt(tab.url); });
接受通讯消息时触发
chrome.tabs.getSelected(null, function(tab) { console.log(tab.id); }
.
manifest.json原文如下
"content_scripts": [ { "js":["js/jquery-2.2.0.min.js","js/tool.js","content_scripts.js"], "matches":["http://*","https://*"] } ],
改成
"content_scripts": [ { "js":["js/jquery-2.2.0.min.js","js/tool.js","content_scripts.js"], "matches":["http://*/*","https://*/*"] } ],
竟然是因为斜杠引起的boom