1

I am trying to learn how to create phars and i am getting this error and have no clue how to fix it. Any ideas?

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

I am following the code form this page: packaging your app with phar

4

2 回答 2

3

使用 Windows 的完整路径,例如

$srcRoot = getcwd() . '/src';
$buildRoot = getcwd() . '/build';
于 2013-10-05T10:00:51.723 回答
1

我一直在关注同一篇文章,问题是路径或它们在前几行中的定义方式,这就是我所做的:

    $srcRoot = "src/";
    $buildRoot = "build/";

此解决方案适用于 Ubuntu 12.04.3 LTS

于 2013-11-03T16:02:58.953 回答