Jump to content

Recommended Posts

I have a server on which I have 4 websites, now I have to shift all of these to a different server. However, the paths of many directories and programs etc. are set up individually in each php script and the processing perl scripts.

So I shall have to go through each file of each website to set the things working again. because earlier the path was /usr/local/apache2/htdocs

now it is /var/www/html and there are many such paths.

 

 

This time I want to create a single file containing all the paths, so that next time if the server is shifted, it would require only a single file to be amended rather than each file.

 

 

Can someone suggest how to do this for PHP and perl scripts both suh that I may include the file containing paths in both PHP and perl scripts.

 

I have checked the PHP include function,

 

include 'paths.php';

 

but how can I include PHP script in a PERL script. Please help.

 

Link to comment
https://forums.phpfreaks.com/topic/207686-how-to-create-environment-file/
Share on other sites

Cant' you reference them all from document root and so you do not have to individually code each one? Then you just have to say that images are kep in the pics directory, include files in the inc directory or whatever. Of course, that way you would have to set up the structure of your website each time, but that would need to be done anyway.

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.