javascript - 要求 - 没有这样的文件或目录

标签 javascript php html mysql

如何修复 php.ini 中“require”函数内的地址?它进行故障排除并显示错误:

警告:require (..) 无法打开流:没有这样的文件或目录。 the error i get on the browser.

this is my folder structure 文件“db_connection.php”工作得很好 - 它有“app_config.php” -> 必需的,但是当我需要“register_user.php”中的“db_connect.php”时,我收到所有这些错误,并且地址确实匹配..

this is the file tree

register_user.php file contents.

注册用户php文件包含

需要“../../../app_configuration/db_connect/db_connection.php”;

db_connection的内容是

需要“../../app_configurations/definitions/app_config.php”;

db_connection.php

最佳答案

不要使用../../语句。

改用include $_SERVER['DOCUMENT_ROOT'].'/assets/app_configuration/db_connection/db_connection.php'

关于javascript - 要求 - 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46870044/

相关文章:

jquery - 元素列表太长,我们如何检测情况并解决它?

javascript - feathersjs中request entity too large错误如何解决?

javascript - 如何在 webpack 构建中检查 jQuery.fn.extend 中重复的函数名

javascript - 如何覆盖 setTimeout() 和 setInterval() 以允许动态调整

php - MyISAM 的意外双插入

javascript - oAuth 2 用于授权和自动登录

php - ZF2 "Unable to render template"Zend 在错误的目录中查找

javascript - 我怎样才能让背景图片占据整页

javascript - 将列表向上/向下滚动到一个 div

javascript - 取消异步/等待