Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 PHP 页面中有一个for-loop运行 4-5 次的页面。我必须在该循环中添加一个 URL 重定向,以便它重定向到的页面被访问 4-5 次(每次都有新$_GET值)。但是当我离开页面时,显然状态for-loop已经消失了。我知道会话变量是一个可能的解决方案,但我想知道有没有更好的方法来做到这一点?
for-loop
$_GET
我想多次重定向的原因是调用一个 API,该 API 返回生成图像并保存在目录中。每次我必须调用不同的 URL(实际上是不同的$_GET值),以便在每次调用时生成不同的图像。