Forum Moderators: coopster
I would like to use a configuration file in each script that will extract/set the root path for the site, depending upon whether it is on the Windows platform or on Linux. No problem! However, how do I call that config.php file from within the scripts without facing the same problem?
Look Here [webmasterworld.com]
Consider only the thread first part.
Perhaps I'm not explaining myself properly. Let me try again.
Say I've got a small search form that calls search.php from any page, anywhere in the site. The search script is located in the scripts folder off the root of the web. The trouble is, the root is different on my Windows machine than on the virtual server on the Linux host. So, for the active web I would normally call the script up via /scripts/script.php and know that it will work regardless of what folder/page calls it. But this path doesn't work on Windows.
I would therefore like to call $root_path/scripts/script.php where $root_path has been determined by an initialisation script.