简体   繁体   English

无法创建phar

[英]Cannot create phar

I am trying to learn how to create phars and i am getting this error and have no clue how to fix it. 我正在尝试学习如何创建phars,我收到此错误,并不知道如何解决它。 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 我正在关注此页面的代码表单: 使用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 此解决方案适用于Ubuntu 12.04.3 LTS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM