I’ve got few scripts, which use require to the same script (it is main configration script). Can I determine somehow which script used require, and depends on it load specific configuration from main file?
I think that it cant be done, but it worth a shoot!
I’ve got few scripts, which use require to the same script (it is main
Share
Well, you could set some parameters before the
requirecall, and then read them to determine what to load.Or you could use
$_SERVER['PHP_SELF'], but it’s a messy variable.