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!
检查脚本需要的是什么
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
dpno17028 2012-10-19 14:35关注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.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报