网站制作
Python爬取Wallpaper全站高清壁纸脚本
话不多说直接上代码,都有注释,如果有不懂的可以提出来或者有更好方案也可以提出来,大家一起学习。#!/usr/bin/env python3# -*- coding: utf-8 -*-import requestsimport urllib.parsefrom lxml import etreeimport reimport os# 自定义错误class Error...
Nginx禁止指定目录执行PHP
在PHP开发中,某些目录的PHP文件不需要用户执行访问,为了安全我们是可以直接禁止访问的。这里我的站长站就分享了一篇Nginx禁止指定目录执行PHP ,可以轻松禁止某个目录执行脚本。location ~* ^/(uploads|templets|data)/.*.(php|php5)$ { return 444; ...
Jquery.md5.js加密插件下载和使用方法
下载地址国内节点下载地址:http://www.gongjuji.net/Content/files/jquery.md5.jsjquery官网下载地址:http://plugins.jquery.com/project/md5GitHub下载地址:https://GitHub.com/Yezacx/md5使用教程首先引用jQuery库和jQuery.md5.js<script src="jquer...
file_get_contents函数访问大文件超时解决方法
file_get_contents函数在访问大文件时,会报错504超时,下面分享下我的站长站的解决方法。$opts = array('http'=>array('method'=>"GET",'timeout'=>60,)); $context = stream_context_create($opts); $html =file_get_content...
ChatGPT整合微信机器人教程
准备工作1、服务器(挂微信)2、chatGPT密钥(自行注册,去OpenAI官网去获取密钥)3、一个微信小号教程开始1、安装Ubuntu20.x 后 要先安装 curl ubuntu/debian 系统安装 Curl 方法:apt-get update -y && apt-get install curl -ycentos 系统安装 Curl 方法:yu...
php上传大文件报错Internal Server Error
php上传大文件报错Internal Server Error,导致文件上传失败。接下来我们就解决这个问题。Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server ...
m3u8视频TS合并Python脚本
用python继写的ts合并m3u8视频功能,抽离出来分享给大家使用。合并的本质还是一下FFMPEG,请自行去官网下载放置脚本能找到的位置python使用3.9版本,python 2已经不用再去支持了。#!/usr/bin/python# -*- coding: UTF-8 -*- import os def run_cmd(s_cmd...
js中的return false详细使用说明
return false功能介绍js中的return false作用就是阻止事件的默认行为,让JS跳出执行,不再执行下面的代码。函数的使用案列function check() { if(form.title.value=="") { alert("请输入文章标题!"); return false; //注意不能写成 return(...
file_get_contents函数判断链接是否失效
在nginx环境中无法使用get_headers函数方法,所以我的站长站这次分享的是用php的file_get_contents函数来判断链接是否失效。原理就是通过file_get_contents函数远程访问链接,判断返回的$http_response_header的HTTP 标头。file_get_contents代码如下:fu...
JavaScript判断链接是否有效
方法一: JS的XMLHTTP方法<script language= "javascript">function getURL(url) { var xmlhttp = new ActiveXObject( "Microsoft.XMLHTTP"); xmlhttp.open("GET", url, false); xmlhttp.send(); if(xmlhttp.ready...