我使用的php
代码包含:
require_once 'PHPUnit/Autoload.php';
include 'vendor/autoload.php';
此php
文件使用localhost
在XAMPP
上完美运行,但当我尝试在自己的共享主机服务器上运行时,会出现此错误:< / p>
Fatal error: require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
A PHP Error was encountered
Severity: Compile Error
Message: require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
任何帮助将不胜感激
答案 0 :(得分:0)
看来你在本地安装了一个很老的PHPUnit梨版本。多年来deprecated。相反,您需要将phpunit添加到composer.json
:
{
"require-dev": {
"phpunit/phpunit": "5.0.*" //or whatever version you need
}
}