Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:15:26+00:00 2026-06-03T04:15:26+00:00

My hosting service sets my absolute path in php to /customers/12345/BASEPATHOFMYWEBSPACE so, i have

  • 0

My hosting service sets my absolute path in php to “/customers/12345/BASEPATHOFMYWEBSPACE” so, i have to enter “/customers/12345/BASEPATHOFMYWEBSPACE/MYFOLDER” to get to MYFOLDER, but in html “/MYFOLDER” totally works.

because of the way my site is structured, this is a huge problem for me…

is there a way i could come up with a function, i would then include in all my php files that would trick php into accepting “/MYFOLDER” as the absolute path to MYFOLDER?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:15:28+00:00Added an answer on June 3, 2026 at 4:15 am

    this is a huge problem for me…

    But this is just how it is – it’s not specific to your hosting provider. If you can’t get your head around the difference between URL paths and filesystem paths, then you’re going to have lots of problems.

    Chances are the webserver already knows the difference – have a look at the output of phpinfo().

    If you’ve got your own vhost, I suspect you’ll find that “/customers/12345/BASEPATHOFMYWEBSPACE” = $_SERVER[“DOCUMENT_ROOT”];

    So if you want to map a URL to filesystem path:

    function to_file_path($url)
    {
       $parts=parse_url($url);
       return $_SERVER["DOCUMENT_ROOT"] . $parts['path']
    }
    

    and conversely:

    function to_url_path($file)
    {
      $file=realname($file);
      if (substr($file, 0, strlen($_SERVER["DOCUMENT_ROOT"]))
            !==$_SERVER["DOCUMENT_ROOT"]) {
         return false;
      }
      return substr($file, strlen($_SERVER["DOCUMENT_ROOT"]));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My shared hosting service denies the ability to view errors in PHP in php.ini.
I have a WCF service and am hosting it in a Windows Service. I
I have six wcf services that I'm hosting in a windows service. Everything works
I have an ASP.NET MVC3 application deployed to a shared hosting service. It uses
I am now running my code on a web hosting service http://xtreemhost.com/ <?php function
I have a VPS hosting service. First of all, I installed bind9 and everything
I have a image hosting service and people upload offline (they upload to another
I have AWStats provided my hosting service provider. I have google analytics as well
My problem is the following: I use 000webhost's free hosting service. I have a
I'm looking Ruby on Rails and PHP hosting service(shared space or a dedicated server).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.