I have a PHP program that has the user copying a URI into a text field. It then takes that text field and parses out the filename. The problem I’m having is if the user just puts “http://www.test.com/directory/” how can I tell if the file being served is index.php, index.html, etc etc? I tried using apache_lookup_uri, but it’s not giving me the filename.
Thanks
You can’t.
If the server is configured differently you can have files setup for directory index like
main.htmljacko.aspiphone4.jspFranky you only see on your end what parse_url gives you
The above example will output:
/path