Jump to content

Hello am always getting the wrong path to file


csjumper

Recommended Posts

Hello am new to php and am working with a config file.

 

But it always give me a wrong path to file

 

/homedomains/xxxxx/public_html/

 

no / between home an domains.. am frustrated on how to solve this... plz help me in this an attaching the script file.. config file too

 

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

originally the one used is

 

$_SERVER["SCRIPT_NAME"]

 

bcz its a part of a big script so changing this function might cause some problems..

 

can u plz look at the file attached bcz i was thinking that some thing might be wrong with it...which is causing such a problem... i can,t figure out why  /admin/ is missing from the path...

 

 

/home/admin/domains/xxxxx/public_html/

but its getting

/homedomains/xxxxx/public_html/

 

 

it getting the path but its wrong :|..

Link to comment
Share on other sites

I can't give you line numbers as the copy of the file I downloaded was wrapped at 80 characters and a little difficult to read

 

However str_replace is used at least 3 times in there to remove /admin/, /members/, /cron/, etc... from URL's that it appears to be building.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.