Jump to content

how to create environment file


raman

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.