您的位置: 首页 > 发表在 2020年11月 的所有文章
11月2020
php文件处理相关 批量替换等等
<?php
$dir=dirname(__FILE__).'\dir';
$filenames = getDir($dir);
//处理
function dochandle($file){
$content=file_get_contents($file);
//preg_match_all('/(\...阅读全文
评论:0条
11月2020
window 添加自定义服务 添加php程序到服务
第一步下载两个exe
srvany.rar
第二步添加服务
#cmd
c:/instsrc.exe ServerName c:/srvany.exe #添加服务
#ServerName 自定义服务名
c:/instsrc.exe Server...阅读全文
评论:0条
11月2020
Apache 设置某个目录文件为直接下载header
<Directory C:/phpstudy_pro/WWW/xxxx/xxxx>
AllowOverride All
ForceType application/octet-stream
Header append Content-Disposition "attachment;"
</Director...阅读全文
评论:0条
11月2020
Apache 设置自定义 php环境变量server
Options +FollowSymlinks -Multiviews
RewriteEngine On
#Authorization Headers
RewriteCond %{HTTP:Authorization} ^(.+)$
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Aut...阅读全文
评论:0条
11月2020
Apache中 RewriteCond 规则参数介绍
Apache中 RewriteCond语句对于我来说一直是个难点,多次试图去把它搞明白,都没有结构,这次我终于算大概知道它的意思了。
RewriteCond就像我们程序中的if语句一样,表示如果符合某个或某几个条件则执行RewriteCond下面紧邻的RewriteRule语句,这就是RewriteCond最原始、基础的功能,为了方便理...阅读全文
评论:0条
11月2020
nginx 反向代理设置
#PROXY-START/
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass http://14.192.48.28;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_ad...阅读全文
评论:0条
11月2020
windows git相关 curl清除代理等
翻墙后自动在ie的局域网设置里加了本地代理端口
导致后面在命令行执行curl时总是经过本地代理
如下临时清除
export -p //查找是否有ftp_proxy、http_proxy、https_proxy
如有
export -n http_proxy //即可在本次shell中不...阅读全文
评论:0条
11月2020
php设置断点续传下载文件
<?php
$file = $_GET['file'];
$localPath=dirname(__FILE__).'/shutt/'.$file;
if(file_exists($localPath)){
$obj = new FileDownload();
$flag = $obj->downl...阅读全文
评论:0条
11月2020
php curl 断点续传文件
function download($url,$id,$cookie,$format){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);//是否直接显示内容
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
...阅读全文
评论:0条
11月2020
js 判断是否微信小程序浏览器打开
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
var ua = navigator.userAgent;
if (ua.match(/MicroMessenger/i...阅读全文
评论:0条








