I receive errors(mentioned below code) when I switched my code to another system,
Configurations:
OS : Windows 7 php server : Xampp
Please help me t
Your constants need to be strings. So you have to "wrap" them in quotes like this:
define('ROOT',$_SERVER['DOCUMENT_ROOT']);
^ ^
When in doubt, always check the Manual, in that case define()
Add:
Also defining constants in a function is, what I find, a bit "dodgy". If you insist on not moving them to another (e.g. config
) file which is loaded in the very beginning then at least take them out of the class construct.