我有一个.php脚本,用于创建我的产品列表.我在共享主机上,所以我不能做很多查询,否则我会得到一个空白页面.
这就是我现在使用我的脚本的方式:
script.php?start=0&end=500&indexOfFile=0 ->> make a product0.txt file with first 500 products
script.php?start=501&end=1000&indexOfFile=1 ->> product1.txt file with another 500 products
script.php?start=1001&end=1500&indexOfFile=2 ->> product2.txt file with last 500 products
Run Code Online (Sandbox Code Playgroud)
如何修改脚本以便自动生成所有这些文件,以便我不必每次手动更改链接?
我想点击一个按钮来执行此操作:
product0.txt使用前500个产品制作文件
等5秒
product1.txt与另外500个产品一起制作文件
等5秒
product2.txt使用最近500个产品制作文件