|
Posted by Erwin Moller on 11/22/05 11:17
Freebird wrote:
> tks
Hi,
>
> Well, everysite has the virtual path, and a fisic path, like:
>
> http://www.name.com/
I always try to use relative path where possible.
So I am not sure you need the URL, but maybe you do.
If you do: Store it somewhere in a file that is included everywhere, so you
have only 1 place to modify it.
> and a
> /home/site/folders
That one can change I expect from installation to installation, so maybe
that is a good one to use in your include_path.
>
> I guess if I can find both in each server, my script will run ok in every
> server it's installed, right ?
I hope so. :-)
Make sure you test it a few times.
If you set things up smart you will be able to do a install with minimal
configuration (= editting some some).
>
> If so, which is the best method to get both of paths above ?
The URL has nothing to do (directly) with your fysical paths, and in most
cases an application doesn't even to know if you use relative links.
The real location (path) could be usefull to put in include_path. Not always
because in many cases you can also use relative paths, like:
include_once('../includes/mydbconnection.php');
I find the include_path usefull to circumvent the hassle of changing
relative paths from different script, especially if one of the scripts
includes another one. The relative path can give you a headache. That is
where include_path is usefull.
>
>
> I'm using: php+mysql+smarty
> Win and *nix
Good luck.
Just test and test. :-)
Regards,
Erwin Moller
>
> Tks a lot
>
>
> Freebird
[Back to original message]
|