Answer the question
In order to leave comments, you need to log in
How to write the path to the executable #!.... with spaces in the path?
Good afternoon! tell me how to write the full path to the file + taking into account the configuration parameters at the beginning of the script.
In this case, we are talking about Yii2 and its cli script ./yii
such a problem for poppy (maybe there is another solution) MAMP PRO in the WEB version loads one config file, and for the CLI version - another one. and I need it to work on the main.
I don’t want to bother with copying one to another, I just want to understand whether it is possible or not, if so, how.
its code is the following:
#!/usr/bin/env /Applications/MAMP/bin/php/php7.4.2/bin/php
<?php
/**
* Yii console bootstrap file.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
$config = require __DIR__ . '/config/console.php';
$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);
#!/usr/bin/env /Applications/MAMP/bin/php/php7.4.2/bin/php
#!/usr/bin/env /Applications/MAMP/bin/php/php7.4.2/bin/php -с /Library/Application Support/appsolute/MAMP PRO/conf/php7.4.2.ini
Could not open input file: Support/appsolute/MAMP
/Applications/MAMP/bin/php/php7.4.2/bin/php -с /Library/Application Support/appsolute/MAMP PRO/conf/php7.4.2.ini
#!/usr/bin/env /usr/local/bin/php_7.4.2_with_config
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question