|
Posted by Justin Koivisto on 02/23/06 05:38
ZeldorBlat wrote:
> Justin Koivisto wrote:
>> Sheldon Glickler wrote:
>>>
>>> require_once("sqlLoginDB.php");
>>
>> If this is going into a function or included file, it should be an
>> absolute path. For instance, if the sqlLoginDB.php file is lcoated in
>> the same directory where this code is found, you should use:
>>
>> require_once dirname(__FILE__).'/sqlLoginDB.php';
>>
>> That way, no matter what the current working directory is, the file can
>> be found.
>
> Absolutely not. This would imply that sqlLoginDB.php lives in the same
> (internet-accessible) directory as the calling file. Files that you
> include (database connection code, class definitions, etc.) should live
> in a directory /outside/ the webserver document tree. Set the include
> path directive in php.ini appropriately.
I think you missed the point of my statemnet. I didn't say do save it
there... I said *if* it was saved there... The point I was making is
that you want to use absolute system paths, not relative.
I've learned that when giving suggestions to solve a problem to focus on
the specific need at hand. If the OP was asking about a secure or safer
way of doing things, the reply would have been much different.
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com/
*** Free account sponsored by SecureIX.com ***
*** Encrypt your Internet usage with a free VPN account from http://www.SecureIX.com ***
[Back to original message]
|