Jump to content

Question with $_GET


mind-owner

Recommended Posts

If this is the file you're looking for:/2/text.pngAnd the 2 comes from $_GET['file'], you can check like this:if (!file_exists($_GET['file'] . "/text.png")){header("Location: http://www.mysite.com");}You might also need to use the full path to the file instead of a relative path. So if the script this code is in is in the root of the site then you can use this:if (!file_exists(dirname(__FILE__) . "/" . $_GET['file'] . "/text.png"))

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...