试图运行我的本地PHP项目(的index.php)时得到这个警告:无法打开流:没有这样的文件或目录在...? PHP具体
Warning: require_once(/Controller/BulletinController.php): failed to open stream: No such file or directory in /Library/WebServer/Documents/WEBB_SERVER/6.2.1x/index.php on line 2
Fatal error: require_once(): Failed opening required '/Controller/BulletinController.php' (include_path='.:') in /Library/WebServer/Documents/WEBB_SERVER/6.2.1x/index.php on line 2
没有这样的文件或目录?这是我第6行中的index.php:
<?php
require_once ("/Controller/BulletinController.php");
require_once ("/General/MasterPage.php");
require_once ("./General/dbConnection.php");
session_start();
我试着给BulletinController.php 777个权(只是本地开发),但没有运气。
这是我的结构是什么样子,所以一切就绪:
感谢您的任何意见。
文件\目录的权限? –
你是什么意思?我应该在终端中为整个文件夹/所有文件激活777权限吗? – Dolcens
经常遇到此错误,并快速排除故障,请按照下列步骤操作:https://stackoverflow.com/a/36577021/2873507 –