摘要: 用TP 集成支付宝账户绑定功能时碰上个问题 ORM 下有文件 config.class.php 直接import()后 发现里面的变量无法使用 但确实是加载咯。。(在config.class.php输出内容成功) 思考百度了半天。。 原来一直知道 JS 作用域 忽略了 PHP 函数也有作用域的- - 具体原理: <?phpclass b{ function test(){ myImport("a.php"); $testClass = new impClass(); $testClass->test(); echo $a."from b"; 阅读全文
posted @ 2013-05-09 10:04 ﹏Sakura 阅读(318) 评论(0) 推荐(0) 编辑