PhpBrew\Utils::editor PHP Method

editor() public static method

public static editor ( $file )
    public static function editor($file)
    {
        $tty = exec('tty');
        $editor = escapeshellarg(getenv('EDITOR') ?: 'nano');
        exec("{$editor} {$file} > {$tty}");
    }

Usage Example

Beispiel #1
0
 public function execute()
 {
     $root = Config::getPhpbrewRoot();
     $php = Config::getCurrentPhpName();
     $file = "{$root}/php/{$php}/etc/php.ini";
     Utils::editor($file);
 }
All Usage Examples Of PhpBrew\Utils::editor