我有一些在屏幕上输出图像的脚本,间隔为5秒。 所有图像位于一个名为images/easter
的目录中。 显示网页的URL是http://'localhost'/index.php
。我有一个变量:$directory = 'images/easter/
。PHP解析URL图像目录
我们希望用户创建一个新的图像目录并上传图片(例如images/holiday
)。 新图像必须在url中进行简单更改才能显示。
http://'localhost'/index.php?holiday
我认为这可以通过PHP中的URL解析完成。但如何编写脚本?
谢谢先进。
你可以让你的URL是这样的http:// 'localhost' 的/指数。 php?q =假期,并使用$ _GET ['q']获得您的参数ameter –
axact是如何合成的?这将无法正常工作:$ directory ='images /'。((isset($ _ GET ['q'])); with http://localhost/harald/index.php?q = test – Quinox