LMLPHP后院

基于JavaScript在线头像图片编辑前端后台实现

ss="preview-container">' +'<img src="" class="jcrop-preview" alt="Preview">' +'</div>' +'</div>'; $(document.body).append($preview_html); var $preview = $('#preview-pane'), $pcnt = $('#preview-pane .preview-c...

Jquery绑定Ajax请求全局错误处理不生效的问题

每个请求发生错误都单独处理,那是非常可怕的, 设计全局错误处理是非常重要的。 看 JQ 的官方文档,提供了 ajaxError 的错误处理方法,该方法在 Jquery 比较新的后续版本中只支持绑定在 document 上了。看官方文档给人的感觉是,你只能使用 ajax 才能有效,什么 get,post, getJson, getScript 等都不一定会生效,如果想不被全局错误处理干扰,可以设置 global:f...

Nginx SSL 代理设置完整示例

g; } location ~ ^\/index\.php { #rewrite ^/(.*) /index.php/$1 break; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(.*)$; inc...

Chrome插件在高版本浏览器中安装报错解决

306.cn/otn/leftTicket/init*"], "js": ["Lib/jquery.min.js", "12306autoselected.user.js"], "run_at": "document_end" } ] } manifest version 2: { "name": "抢票插件第二代",//程序名称 "version": "1.0",//版本信息 "manifest_versi...

写网页爬虫遇到标签匹配难题

时,由于标签里面的 JavaScript 代码中含有大于号“>”导致无法匹配完整的标签内容。将这样的问题分享出来,不知道像百度啊他们的爬虫是如何处理这样的问题的。请看下面的代码: <!-- HTML DOCUMENT --> <IMG onmousewheel="return imgzoom(this);" onmouseover="if(this.width>screen.width*0.7) {this.re...

不靠谱的 execCommand 之 insertText

最近发现编辑器在执行 insertHTML 遇到剪切板内容为标签时,出现的怪异现象,于是改成了 insertText。实在搞不懂 MDN 上的 paste 是什么作用,被坑了好几次。document.execCommand("insertText",false,text);上面的方式做了一次变更,因为 insertText 粘贴的时候会产生很多节点,不能很好的处理换行,不知道怎么回事,最后改为如下。documen...

基于 HTML5 的 EventSource 实时推送实现

rce)!=="undefined") { var source=new EventSource("/chat.php"); source.onmessage = function(event) { document.getElementById("result").innerHTML=event.data + " "; }; }else{ document.getElementById("result").in...

Linux 下用户组别权限的理解

nnection to lmlphp.com closed. Welcome to Ubuntu 14.04 LTS (GNU/Linux 2.6.32-042stab108.8 x86_64) * Documentation: https://help.ubuntu.com/ You have new mail. Last login: Thu Aug 3 04:31:07 2017 from 202.101....

OpenResty Lua Redis 加速接口响应

try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(.*)$; inc...

油管播放速度调整

改变油管视频的播放速度,试试这个吧。javascript:document.getElementsByTagName('video')[0].playbackRate=3 ...
2024-04-19 10:59:13 1713495553 0.006489