Shared Hosting | Absolute location of a file

If you want to access a file on a shared hosting server by specifying its absolute location it may not work. The reason is what we see on shared hosting as root folder actually may have more before it that is not visible to us for security reasons (as machine has shared hosting). The solution is to use Apache/Web server’s ‘DOCUMENT_ROOT’ variable before file path. Like in PHP use it as:


Webner Solutions is a Software Development company focused on developing CRM apps (Salesforce, Zoho), LMS Apps (Moodle/Totara), Websites and Mobile apps. If you need Web development or any other software development assistance please contact us at

Leave a Reply

Your email address will not be published. Required fields are marked *