标签: php bandwidth
我想创建一个脚本来提升我网站的带宽,以检查每月津贴是否正常工作。
<?php for($i=0;$i>2000$i++) { //largest jpg on the website file_put_contents("tmp.jpg", file_get_contents("http://someurl/tmp.jpg")); unlink("tmp.jpg"); } ?>
上面的代码是否会以我希望的方式工作,或者因为它是同一个文件,服务器是不是会再次“下载”它?
答案 0 :(得分:1)
根据第二篇文章here,file_get_contents不会缓存PHP文件。我没有理由认为它应该。
file_get_contents