hey guys, i'm setting a path variable with a query-string. what's the easiest way to check if the path (always a directory) exists or not.
if(isset($_GET['p'])) {
define(PATH, $_GET['p']);
so now i have like mydomain.com?p=files/folder/sub and everything works fine, i'm reading the contents of the folder. however i can pass along ?p=shit/whatever and i don't get a 404 or anything like that. the system reads a folder which does not even exist.
i bile 404 gerekir, ama sadece yazdırmak ('yok!') veya benzer bir şey istemiyorum.
what's the best method to do that? thank you