Ich habe ein Konstrukt Funktion, wo ich include_path
verwende, sucht die Funktion wie folgt aus:include_path nicht auf PhpStorm arbeiten
public function __construct()
{
$url = $this->parseUrl();
if(file_exists('application\controllers'.$url[0].'.php')){
$this->controller=$url[0];
unset($url[0]);
}
require_once 'application\controllers'.$this->controller.'.php';
echo $this->controller;
}
Leider, wenn ich versuchen, eine vorhandene Controller-URL wie diese http://localhost/project/public_html/home
ich laden erhalten folgende Fehlermeldung:
Warning: require_once(application\controllers home.php): failed to open stream: No such file or directory in C:\xampp\htdocs\project\application\core\App.php on line 24
Fatal error: require_once(): Failed opening required 'application\controllers home.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\project\application\core\App.php on line 24
ich folgte dem documentation und ich eingeschlossen die Pfade:
C:\xampp\htdocs\project\application
und
C:\xampp\htdocs\project\application\controllers
aber ich bin immer noch immer den Fehler, und ich bin nur ahnungslos, warum ... kann mir jemand helfen?
Vermutlich fehlt Ihnen ein '\', es sollte 'application \ controllers \' sein. $ This-> controller. '. Php'; –