我有一个类,它包括Smarty,但我的类使用命名空间测试,Smarty不使用命名空间.如何包括Smarty,而无需将名称空间写入智能文件(它有许多系统插件)
import "smarty/Smarty.php"
class testik
{
public function __construct ()
{
$smarty = new Smarty();
}
}
<?php
class Smarty
{
//somcode
}
Run Code Online (Sandbox Code Playgroud)
Smarty有自动加载器类并包含其插件,插件也没有命名空间.