Re: Full versus relative URLs
| From: | Dotan Cohen | Date: | Tue, 17 Feb 2009 20:04:37 +0000 |
| Subject: | Re: Full versus relative URLs | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288479@lists.php.net to get a copy of this message | ||
> Easy to solve.
>
> ini_set("include_path",
> "/srv/domain/phpinclude:/srv/domain/record_include:/srv/domain/process_include");
>
> Then just call it without path - IE
>
> include('foo.inc');
>
> php will first look for foo.inc in /srv/domain/phpinclude, then in
> /srv/domain/record_include, etc.
>
> make directories for your includes, preferably outside the web root, and
> define your include path at the top of your script.
>
> I personally don't like to have . as part of my include path, and relative
> include paths (id somedir/foo.inc) are IMHO an even worse practice.
>
I did not know that his was possible. Thanks!
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü