Reply to Re: Dumbfounded

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация