时间:2021-07-01 10:21:17 帮助过:1人阅读
require 'Doctrine/ORM/Tools/Setup.php';
$lib = "/path/to/doctrine2-orm/lib";
Doctrine\ORM\Tools\Setup::registerAutoloadDirectory($lib);
?>
namespace Sandbox;
use Doctrine\Common\ClassLoader,
Doctrine\ORM\Configuration,
Doctrine\ORM\EntityManager,
Doctrine\Common\Cache\ApcCache,
Entities\User, Entities\Address;
在doctrine配置时有这样的语法,php有这样的语法么,也不会出错。
require 'Doctrine/ORM/Tools/Setup.php';
$lib = "/path/to/doctrine2-orm/lib";
Doctrine\ORM\Tools\Setup::registerAutoloadDirectory($lib);
?>
namespace Sandbox;
use Doctrine\Common\ClassLoader,
Doctrine\ORM\Configuration,
Doctrine\ORM\EntityManager,
Doctrine\Common\Cache\ApcCache,
Entities\User, Entities\Address;
有的,这是php的namespace
写法,反斜杠标示了命名空间的层级,不过这个只有在php 5.3里才能使用。