我的项目结构如下所示:
在我的
index.php
abilities.php
具有
<?php
if (isset($_GET['site'])) {
switch ($_GET['site']) {
...
case 'abilities':
include("./content/abilities.php");
break;
...
}
}
?>
在里面
能力.php
Ability.php
通过
require_once ("./model/Ability.php");
它在浏览器中运行得很好,但PhpStorm表示它找不到类:
model
类的目录
Ability.php
content
不存在的目录。
能力.php
将在
root
类似目录
比如为
能力.php