- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在本地主机上重新安装我的网站后,出现以下错误。
Fatal error: require_once() [function.require]: Failed opening required '/Applications/XAMPP/xamppfiles/htdocs/sites/all/modules/custom/redirect/redirect.install'
.install 文件确实存在,如下:
1 <?php
2 /**
3 * @file
4 *
5 */
6
7 /**
8 * Implementation of hook_install().
9 */
10 function redirect_install() {
11
12 }
13
14 /**
15 * Implementation of hook_uninstall().
16 */
17 function redirect_uninstall() {
18 variable_del('desktop_site_home');
19 variable_del('mobile_site_home');
20 }
该模块根本没有 require 或 include 语句。
有人知道这里可能出了什么问题吗?
提前致谢..
最佳答案
您遇到权限和/或文件所有权问题。
快速修复它们。这是我的技术:
cd 到模块的目录并:
chmod 775 *.install
(可选) ls -la 并查看 Drupal 文档根目录中是否存在文件的主要所有者。假设您在 www-data 组中有一些属于 www-data 的文件。
如果是这样,这可能是您的网络服务器正在运行的用户。所以...
chown www-data:www-data [文件名]
希望有帮助
乔
关于drupal-7 - fatal error : require_once() with module . 安装文件,drupal 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9037544/
我正在从头开始构建 PHP CMS。我的系统中有一个 super 核心文件,我目前已自动导入构成系统核心的所有其他包和类。在典型的页面上,只会使用其中的几个类和方法。 考虑到 require_once
我有这个条件: 文件:/public_html/folderX/test.php有一条线:require_once '../functions/sendemail.php' 另一方面,/public_
这只是风格上的差异,还是使用 require_once('filename.php') 与 require_once 'filename.php' 有实际的负载/效率差异? 最佳答案 梨编码标准说:
我有这样一种情况,即使我有相同的文件和文件夹结构,php 行在本地主机上工作正常,但在实时服务器上却不行。 require_once '/../Renderer.php'; 我在实时服务器上遇到的错误
这个问题在这里已经有了答案: 8年前关闭。 Possible Duplicate: relative path in require_once doesn’t work 我有一个这样的项目结构: Pr
windows 上 php 的奇怪问题...我的应用程序加载了一个“核心”文件,该文件加载了一个设置文件、注册自动加载、进行初始化等。在核心文件的顶部我有 include_once("config.p
当我使用 require_once 并尝试访问所需文件中的变量时,出现变量 ($db) 未定义的错误。 我尝试将 require_once 语句放置在几个不同的位置,因为我认为这可能是变量范围问题,但
我有两个文件 1 - index.php2 - main.php index.php 通过 调用main.php 我怎么知道 main.php 什么时候执行, 如果 index.php 调用他
我有两个文件 1 - index.php2 - main.php index.php 通过 调用main.php 我怎么知道 main.php 什么时候执行, 如果 index.php 调用他
如果我有: require_once("bla.php"); class controller{.....} 如果我随后在不同的文件中创建class control_A extends control
这是我的部分代码:
我有两个从数据库检索值的函数。当我访问函数内部的连接($connection)时,我无法访问数据库。我使用的是mysql+PHP 这是代码: 0"; $result = $connect
我有一个 php 页面 (horses.php),其中包括: 发生的事情是我在 send_email.php 文件中有一些脚本来发送电子邮件(并做一些其他事情)。 现在,当 horses.php
php /home/test9/public_html/degerlendir/test-4567.php "var1=18&var2=22" 我需要使用 cron 作业在后台运行一个页面。我用上面的
我只是想知道是否有人知道为什么我不能使用 require_once 作为 array_walk 的回调。我可以将它包含在一个匿名函数中并运行它,但它给出了一个无效的回调错误: $includes =
我注意到,如果我在类方法中声明一个与外部函数同名的函数,我会得到一个错误: function a(){ ... } class foo{ public function init(){
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
即使更改文件夹的权限后,我仍然会收到以下错误。我不知道该怎么办。不知道为什么。任何帮助将不胜感激。我正在使用 Cent-os 服务器,这是一个 php 脚本。 require_once(mysql_c
这个问题在这里已经有了答案: How to use include within a function? (3 个答案) 关闭 9 年前。 你好,我想在函数中使用 require_once 但不起作
我试图从不同文件夹中的 php 文件中获取我的“库”文件,但在尝试从子文件夹访问它们时出现错误。比如我有这样一个目录: + home - file1.php ++ subfolder -
我是一名优秀的程序员,十分优秀!