Php 无法创建phar
我正在尝试学习如何创建Phar,但我遇到了这个错误,不知道如何修复它。有什么想法吗Php 无法创建phar,php,phar,Php,Phar,我正在尝试学习如何创建Phar,但我遇到了这个错误,不知道如何修复它。有什么想法吗 Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '/myapp/build/myapp.phar', file extension (or combination) not recognised or the directory does not exist' in /Volum
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'Cannot create phar '/myapp/build/myapp.phar', file extension (or combination) not recognised or the directory does not exist' in /Volumes/www/vhosts/myapp/create-phar.php:11
Stack trace:
#0 /Volumes/www/vhosts/myapp/create-phar.php(11): Phar->__construct('/myapp/build/my...', 256, 'myapp.phar')
#1 {main}
thrown in /Volumes/www/vhosts/myapp/create-phar.php on line 11
我遵循此页面的代码形式:使用windows之类的完整路径
$srcRoot = getcwd() . '/src';
$buildRoot = getcwd() . '/build';
使用windows的完整路径,如
$srcRoot = getcwd() . '/src';
$buildRoot = getcwd() . '/build';
我一直在关注同一篇文章,问题是路径或如何在前几行中定义它们,以下是我所做的:
$srcRoot = "src/";
$buildRoot = "build/";
这个解决方案是针对Ubuntu12.04.3 LTS的,我一直在关注同一篇文章,问题是路径或它们在前几行中的定义,下面是我所做的:
$srcRoot = "src/";
$buildRoot = "build/";
此解决方案适用于Ubuntu 12.04.3 LTS