I have some code(dbName,dbPSWD etc) that must be used in many scripts. I moved it to cfg.PHP file and then include this code by "*Require"* command in appropriate place(at the beggining of script).
Now i need to add to every script this line “*mysql_query("SET NAMES 'utf8';")“*; But this line must be added in middle of the scripts (not at beginning). For this reasons after including this line into cfg.PHP scripts works incorrectly. I dont want to write this line in each script. May be i can to include this line into cfg.php, but with the condition that the line will inserted at the middle of the script, not at the place where REQUIRE command is use.
How to solve this problem?
I have some code(dbName,dbPSWD etc) that must be used in many scripts. I moved
Share
Functions are your knight in shining armor. 🙂
cfg.php:
pages: