EchoFool Posted July 7, 2008 Share Posted July 7, 2008 Is there a pre-made function for doing something like: Say a variable had 'testfolder/test.php' or just 'test.php' (as a string). Then you use that variable to check your server to see if that page exists? And if the function cannot find it then it errors ? Is such a function in existance? I did some searching but kept finding functions to check if image locations were valid but never scripts... Link to comment https://forums.phpfreaks.com/topic/113646-check-string-url-is-valid/ Share on other sites More sharing options...
papaface Posted July 7, 2008 Share Posted July 7, 2008 Maybe: http://uk2.php.net/manual/en/function.file-exists.php Link to comment https://forums.phpfreaks.com/topic/113646-check-string-url-is-valid/#findComment-584010 Share on other sites More sharing options...
EchoFool Posted July 7, 2008 Author Share Posted July 7, 2008 Tried that... It accepted "test.php" But php_self see's it as /test.php so then there is a problem. Specially when the test.php is in many subfolders etc. Link to comment https://forums.phpfreaks.com/topic/113646-check-string-url-is-valid/#findComment-584022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.