Php Yii2级';url';找不到
请任何人帮我解释一下在yii2错误中找不到类“Url”的原因我很难理解它如果类不在同一目录中,您需要告诉PHP类的位置以便使用它。添加到Php Yii2级';url';找不到,php,yii,yii2,yii2-advanced-app,classnotfound,Php,Yii,Yii2,Yii2 Advanced App,Classnotfound,请任何人帮我解释一下在yii2错误中找不到类“Url”的原因我很难理解它如果类不在同一目录中,您需要告诉PHP类的位置以便使用它。添加到index.php文件的顶部 index.php <?php use yii\helpers\Url; ?> // Rest of the index file code //其余的索引文件代码 只需导入Url类(在
index.php
文件的顶部
index.php
<?php
use yii\helpers\Url;
?>
// Rest of the index file code
//其余的索引文件代码
只需导入Url类(在