sarga/public/installer/Composer.php

14 lines
368 B
PHP
Raw Normal View History

<?php
2019-01-24 05:33:11 +00:00
// array to pass back data
$data = array();
2019-01-24 05:33:11 +00:00
// run command on terminal
2019-01-22 10:43:56 +00:00
$command = 'cd ../.. ; export HOME=/root && export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update; composer install 2>&1';
2019-01-22 10:43:56 +00:00
$last_line = exec($command, $data['composer'], $data['install']);
2019-01-24 05:33:11 +00:00
// return a response
//return all our data to an AJAX call
2019-01-24 05:33:11 +00:00
echo json_encode($data);