You are using a browser which is not compatible with CSS (for more information, see Tara's tutorial).
Because of this, it is possible that our website may not appear
correctly in your browser. We apologise for the inconvenience, and
recommend you upgrade your browser to one which is compatible with CSS.
For more information, please visit our Browser Upgrade page.
This script will output the path to your base directory (aka "Document Root"), which often needs to be used in Perl & PHP scripts.
<?php ########################################################################### # # # Neither http://www.4webhelp.net/ nor its members accept any # # responsibility, either expressed or implied, for any damage caused by # # using this script or the misuse of this script. # # # # # # INSTRUCTIONS # # # # 1) Copy this code to an editor such as Notepad and save it with a # # .php extension. # # 2) FTP this file to a folder on your site in ASCII mode # # 3) Call up this file in your web browser to see your document root # # # ########################################################################### print ($_SERVER['DOCUMENT_ROOT']); ?> <p>This script courtesy of <a href="http://www.4webhelp.net/">4WebHelp</a>.</p>
I have 2 flash applications in my website that allows fileupload. As I wanted to change the upload size limit to 30 or 40 MB, I wrote a
.htaccess file with (only):
php_value upload_max_filesize 35M
php_value post_max_size 50M
php_value memory_limit 48M
I used your PHP file in order to know what's my directory ROOT and I loaded my .htaccess file into there. I didn't had even the chance to try the bigsized upload because, I JUST DON'T HAVE ACCESS to my homepage anymore.
Is there a way to resolve this problem?
Thankx in advance!
Just keep popping until you get to the home directory. For each pop, add a "../" before the relative addressing.
It can be done by a simple loop.
In cases where you do not set DocumentRoot in the vhost, it will NOT be availible in $_SERVER['DOCUMENT_ROOT']
the Apache developers also state in many bug reports that DocumentRoot should not be relied upon.
This article explains why
http://www.helicron.net/php/
Thank you!
That prints the current working dir. and always works...
THANKS!
register_globals is off by default since PHP 4.2.0 due to the potencial risk of variable poisoning.
Add a new comment