php实现下载限制速度示例分享
代码如下: // local file that should be send to the client $local_file = 'test-file.zip'; // filename that the user gets as default // set the download rate limit (=> 20,5 kb/s) if(file_exists($local_file) && is_file($local_file)) { // send headers // flush content // open file stream while (!feof($file)) { // send the current file part to the browser // flush the content to the browser // sleep one second // close file stream } else { (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |