标签:require pac control pre names mes space UNC test
<?php
require_once "func.php";
require_once "test.php";
$obj = new \b\bb();
$obj->say();
<?php
function redirect($namespace,$controller,$method){
$namespace = "\\".$namespace;
$controller = "\\".$controller;
$class = $namespace.$controller;
$obj = new $class();
$obj->$method();
}
<?php
namespace a;
class aa{
public function say(){
echo "a里面的方法";
}
}
namespace b;
class bb{
public function say(){
redirect(‘a‘,‘aa‘,‘say‘);
}
}
标签:require pac control pre names mes space UNC test
原文地址:http://blog.51cto.com/12173069/2171995