I need to place config file out of phar of my web application. I need to mount it. In my stub file I tried:
<?php
try {
Phar::mount('sites/site.php', __DIR__.'/../sites/site.php');
} catch (PharException $e) {
print_r($e);
};
Phar::mapPhar();
include '../app.phar';
however, I got " Mounting of sites/site.php to D:\(...)\public/../sites/site.php failed
" error message. I tried various file path styles without any success. What is wrong with it?
I use box2 to ubild phar files. It take a long time to build the phar file. Is there any way to make it faster?
The error message is also vague. Any way to get better message?