Joomla 3.x. 如何处理“致命错误:无法重新声明类Mobile_Detect”
2016年1月29日
本教程将向您展示如何处理 致命错误不能在Mobile_Detect中重新声明类Mobile_Detect.php (),这可以显示在你的 website 安装后或在Joomla管理面板中.
Joomla 3.x. 如何处理“致命错误:无法重新声明类Mobile_Detect”
-
在项目页面或安装后可能出现以下错误之一:
致命错误:无法在/templates/theme###/includes/ Mobile_Detect中重新声明类Mobile_Detect.php
警告:require_once (# # # # \ \ templates \主题包括\ Mobile_Detect.在/templates/theme####/html/modules中没有这样的文件或目录.PHP在第5行
致命错误:require_once():打开所需的'# # # # \ \ templates \主题includes\Mobile_Detect失败.php”(include_path = '.:/opt/php54/lib/php')在/templates/theme####/html/modules.PHP在第5行
-
为了解决这个问题,你需要定位 modules.php 你的主题文件 # # # # \ \ templates \主题html 目录 via FTP or 文件管理器 并替换第5行代码:
require_once JPATH_SITE . “\ templates \ \”.美元的模板.' \ \ Mobile_Detect包括.php';
with:
require_once JPATH_SITE . “/模板/”.美元的模板.' / / Mobile_Detect。包括.php';
-
保存更改. 现在应该没有什么问题了.
注意:代码在您的文件中可能会有所不同,但其正确结构如上所列.
请随时查看下面的详细视频教程: