Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Knowledge base
How can I find the complete access path or "path" for my site or for a specific directory?
How can I find the complete access path or "path" for my site or for a specific directory?
in Perl -> my $path = $ENV{'DOCUMENT_ROOT'}:
en PHP ->$path = $_SERVER["DOCUMENT_ROOT"];
You can also use /home/sites/www.yourdomain.xxx but the former method is preferable.
Otherwise, create a file called path.php (with Notepad for example) containing:
<?php
phpinfo();
echo realpath("path.php");
?>
then upload it to your site. Type the address for of file into your browser, and you will find the path at the bottom of the page.To find the path for a specific directory, e.g. the "data" folder found at the same level as the "web" folder, you make a call to realpath:
echo realpath("/home/sites/www.yourdomain.xxx/data");
You will obtain a path in this format: /home/www/b0047a17ab5ce2b774c2f870ae3d7a40/data
Link to this FAQ: