Link to home
Start Free TrialLog in
Avatar of wantime
wantime

asked on

php5: how do i read file from parent directory

hello all,

i have a zend project with followed structure:

Projectname/application/configs/config.ini

Projectname/public/mytest/test.phtml

in config.ini i have an entry: username = abc

the question is: i would write some codes in test.phtml to check if config.ini exist, if it exist, i would like to get the value of username from this file. any suggestion?

thanks,
wantime
ASKER CERTIFIED SOLUTION
Avatar of Hugh McCurdy
Hugh McCurdy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wantime
wantime

ASKER

thanks.

actually i also would like to read the file.  the link followed helps.

http://devilsworkshop.org/parsing-ini-files-using-php/