Relative Paths & Document Root
Posted: Mon Mar 17, 2003 8:27 am
Here's the issue.
All the pages on my website have a form. When a user clicks on "Submit" it sends them to another page. However, since these pages can reside either in the root directory or can be down a level or two in another subdirectory, the "action" part of the form has to have the path info.
I tried using getenv('DOCUMENT_ROOT') and then I'd concatenate the name of the file. While this works fine, however, if a user goes to view the source of the file they see a path something like "usr/etc/httpd/mydomain...../mysubdir/myfile.php"
The question is, how can I dynamically generate the proper path without showing the user the entire directory tree? OR, am I getting worried over nothing.
TIA for your help. Everyone here has been quite helpful.
Jeff
All the pages on my website have a form. When a user clicks on "Submit" it sends them to another page. However, since these pages can reside either in the root directory or can be down a level or two in another subdirectory, the "action" part of the form has to have the path info.
I tried using getenv('DOCUMENT_ROOT') and then I'd concatenate the name of the file. While this works fine, however, if a user goes to view the source of the file they see a path something like "usr/etc/httpd/mydomain...../mysubdir/myfile.php"
The question is, how can I dynamically generate the proper path without showing the user the entire directory tree? OR, am I getting worried over nothing.
TIA for your help. Everyone here has been quite helpful.
Jeff