2013-09-27 51 views
1

我正在嘗試學習如何創建phars,並且出現此錯誤,並且不知道如何解決該問題。有任何想法嗎?無法創建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 /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 

我下面的代碼形式此頁:packaging your app with phar

回答

3

使用用於Windows的完整路徑類似

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

我一直遵循同樣的文章和問題是路徑或它們是如何在前幾行定義的,這裏是我所做的:

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

Th是Ubuntu 12.04.3的解決方案LTS