if I call php’s parse_ini_file('foo.ini'), in what paths does it look for foo.ini ? the include path? the function’s documentation doesn’t mention it.
if I call php’s parse_ini_file(foo.ini) , in what paths does it look for foo.ini
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The filename argument for parse_ini_file is a standard php filename, so the same rules will apply as opening a file using fopen.
You must either specify an absolute file path ("/path/to/my.ini") or a path relative to your current working directory ("my.ini"). See getcwd for your current working directory.
Unlike the default fopen command, if a relative path is specified ("my.ini") parse_ini_file will search include paths after searching your current working directory. I verified this in php 5.2.6.