On Sat, Apr 12, 2008 at 11:06 PM, Bojan Tesanovic <[EMAIL PROTECTED]> wrote:
>
> On Apr 12, 2008, at 8:28 AM, GoWtHaM NaRiSiPaLli wrote:
>
>
> > if(file_exists("../common/config.ini")) {
> > $configData = parse_ini_file("../common/config.ini");
> > } else {
> >
>
>
> Try changing above code so it reads
>
>
> if(file_exists("common/config.ini")) {
> $configData = parse_ini_file("common/config.ini");
> } else {
In your primary file, you could also consider adding:
<?php
$base_path = dirname(__FILE__);
?>
And then, all includes from within that file would be included as such:
<?php
include($base_path.'/common/config.ini');
?>
Finally, on a different note, it may not be in your best interest
to keep a .ini extension on a configuration file, since this is
generally readable on the web.
--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php