For the TP framework's definition of constant addresses, please help the heroes. thank you.
Reply to discussion (solution)
TP is annoying, with a large number of broken people
Php constants cannot be placed in strings!
Put it in a string as a character
TP uses strings to replace the pseudo constants created, confusing many people
TP is annoying, with a large number of broken people
Php constants cannot be placed in strings!
Put it in a string as a character
TP uses strings to replace the pseudo constants created, confusing many people
I tried a few times but it is still not easy to use. maybe I didn't understand what you mean. I am a newbie. please give an example.
What is the output using the code {$ Think. const. IMG_URL} above?
Http://www.thinkphp1.cn/topic/10043.html
Check whether the config file is defined?
What is the output using the code {$ Think. const. IMG_URL} above?
Http://www.thinkphp1.cn/topic/10043.html
Check whether the config file is defined?
Sorry, I didn't understand the TP execution process. I thought it was require '. /ThinkPHP. php '; can be put at will, the original need to define the constant and then require. After this order is adjusted, the above usage will be fine. It's annoying for the moderator.