php
上传大文件报错Internal Server Error
上传大文件报错Internal Server Error,导致文件上传失败。接下来我们就解决这个问题。Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server ...
获取linux服务器进程/内存/硬盘使用情况
获取linux服务器使用状态情况的代码,可以获取进程、内存、硬盘使用情况等等数据.代码如下:function get_used_status(){ $fp = popen('top -b -n 2 | grep -E "^(Cpu|Mem|Tasks)"',"r");//获取某一时刻系统cpu和内存使用情况 $rs = ""; ...
PHP报错Warning: Unknown: Input variables exceeded 1000
PHP报错:Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in .ini. in Unknown on line 0原因是一次性提交表单数据或输入的变量数量超过默认1000个的限制了。解决方法我们只需要修改下这个默认10...
聚合热搜热榜PHP接口API源码
API说明聚合热搜热榜PHP接口API源码,本源码接口均抓取采集各大官网数据。PHP环境为5.6或以上,解压压缩包里面的hotlist.文件到网站目录然后输入参数输入?type参数内容;zhihu(知乎热榜) weibo(微博热搜) baidu(百度热点) history(历史上的今天) bilih...
单文件上传示例代码
<?header("Content-Type:text/html; charset=gb2312");if(isset($_POST['submit'])){$upfiles = new Upload();$upfiles->upload_file();}class Upload{public $upload_name;//上传文件名public $upload_tmp_name;//上传临时文件名public...
报错internal server error的解决办法
.ini 中缺省的最长执行时间是 30 秒,这是由 .ini 中的 max_execution_time 变量指定,倘若你有一个需要颇多时间才能完成的工作,例如要发送很多电子邮件给大量收件者,或者要进行繁重的数据分析工作,服务器会在 30 秒后强行中止正在执行的程序,如何解...
大文件下载超时中断解决方法
<? //设置脚本的最大执行时间,设置为0则无时间限制set_time_limit(0);ini_set('max_execution_time', '0'); $file_name = 'aa.zip'; //本机文件地址$extension = pathinfo($file_name)['extension'];$dowloa...
检测域名是否被微信封锁
<?// 页面编码header("Content-type:application/json"); // 隐藏WARNINGerror_reporting(E_ALL ^ E_WARNING); // 获取headers$checkUrl = get_headers('http://mp.weixinbridge.com/mp/wapredirect?url='.$_REQUEST['url']);$h...
小米运动API接口源码
<?error_reporting(0);if(!empty($_GET['account']) && !empty($_GET['password']) && !empty($_GET['steps'])){ header("Content-Type: application/json; charset=utf-8"); $Mi =...