문제

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

도움이 되었습니까?

해결책

Use the full path for windows like

$srcRoot = getcwd() . '/src';
$buildRoot = getcwd() . '/build';

다른 팁

I've been following the same article and the problem are the paths or how they are defined in the first couple of lines, here is what I did:

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

This solution is for Ubuntu 12.04.3 LTS

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top