Re: include, relative path
- From: "^AndreA^" <andrea.bola@xxxxxxxxx>
- Date: Tue, 27 May 2008 12:50:07 -0700 (PDT)
On May 23, 5:01 pm, Michael Fesser <neti...@xxxxxx> wrote:
.oO(^AndreA^)
Guys, sorry for my lateness... Thank you very much for your answers!
At the end I did simple:
include '../libraries/db_details.php';
It seems so simple and sounds strange to me that I didn't try it... I
really don't know what I was thinking that day... ;-)
An absolute path based on $_SERVER['DOCUMENT_ROOT'] would still be the
better and more reliable choice. You also should keep your library
_outside_ the document root for security reasons.
Micha
mmm... interesting...
I didn't use $_SERVER['DOCUMENT_ROOT'] because include '../libraries/
db_details.php'; sounded simpler and also it works on my localhost and
also on the server online so I didn't bother so much... but I'll have
a look on the internet to understand the advantages...
For what regarding security reasons I'm pretty curios, you say I
should keep my library outside the document root...
1) How could I do that?!?
Where do I have to place it and also how to get it outside of the
document root?
2) Why for security reasons?!?
Nobody can reach my php scripts on the server... or not?
i.e. I could even write a clear password on a php file... right?!?
Andrea
.
- Follow-Ups:
- Re: include, relative path
- From: J.O. Aho
- Re: include, relative path
- References:
- Re: include, relative path
- From: ^AndreA^
- Re: include, relative path
- From: Michael Fesser
- Re: include, relative path
- Prev by Date: Re: PHP Auction
- Next by Date: Re: include, relative path
- Previous by thread: Re: include, relative path
- Next by thread: Re: include, relative path
- Index(es):
Relevant Pages
|