致命错误 php XAMPP [英] Fatal error php XAMPP

查看:52
本文介绍了致命错误 php XAMPP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Laravel 进行设置,当我尝试从 XAMPP 控制面板访问 MySQL 时出现此错误.

I am trying to get make my setup for using Laravel and I am getting this error when I am trying to access MySQL from XAMPP Control Panel.

Warning: require_once(libraries/common.inc.php): failed to open stream: No such file or directory in C:\xampp\phpMyAdmin\index.php on line 20

Fatal error: require_once(): Failed opening required 'libraries/common.inc.php' (include_path='C:\wamp\php\PEAR') in C:\xampp\phpMyAdmin\index.php on line 20

我发现了一些有类似问题的问题,但不知道如何解决这个问题,因为我还没有找到可以解决我的错误的详细回答.

I have found somequestions that had a similar problem, but cannot figure out how to solve this problem, because I haven`t found a detailed answear that could solve my error.

推荐答案

位于 C:\xampp\phpMyAdmin\ 中的脚本 index.php 正在尝试加载文件在相对路径 libraries/common.inc.php 上,即在位置 C:\xampp\phpMyAdmin\libraries 上.

The script index.php located in C:\xampp\phpMyAdmin\ is trying to load file on relative path libraries/common.inc.php, ie on location C:\xampp\phpMyAdmin\libraries.

require_once 具有在找不到文件时,PHP 会因 PHP 致命错误 而中断的功能,更多关于 PHP 手册:require_once

The require_once has the feature that when the file is not found, then the PHP is interrupted with PHP Fatal error, more on PHP Manual: require_once

确保子目录 libraries 对 webserver/apache 可用且可读,并且文件 common.inc.php 存在.

Make sure the subdirectory libraries is available and readable for the webserver/apache and the file common.inc.php exists.

注意:将字符串放在引号 '" 中总是更好.注意:确保根据您的操作系统使用正确的目录分隔符 \/.

Note: it is always better to put strings into quotation marks ' or ". Note: make sure to use correct directories separator \ or / based on your operating system.

这里我猜正确的是 require_once('libraries\common.inc.php')

这篇关于致命错误 php XAMPP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆