Does anyone know how to use a custom $config file? I know ZF and other frameworks such as CakePHP use a custom application.ini file to define application constant variables, environments etc. but how to add a such file and access it's values inside an application built with pure PHP no frameworks.
2 Answers
1 Comment
Andrei Stalbe
Thank you for you answer, it helped me to solve my problem, but what I would also like to do is to use a custom php.ini file or create a custom one in order to override some values from php.ini. I know I could use
ini_set(), but I want to change the PHP session name so I will not have to set ini_set(session.name) on each page where I use session_start().You can access the contents of custom ini files with the parse_ini_file() function. It will return an associative array representing the settings specified in the file.