一.ajax例子:ajaxReturn("ok","eval")->thinkphp中ajax的返回值的方法,返回参数为ok,返回类型为eval(字符串) 1.MainController.class.php <?php namespace Ajaxtest\Controller; use Think\Controller; class MainController extends Controller { public function zhuye()…
示例: #/DB/MySql.class.php也就是DB文件夹下有MySql.class.php文件 namespace DB; class MySql { public function __construct() { var_dump(__FILE__); } } #/index.php namespace Home; use DB\MySql; $mysql = new MySql(); 报错 Fatal error: Class 'DB\MySql' not found in D:\l…