2018-12-31 11:57:32 +00:00
< ? php
2019-01-24 05:33:11 +00:00
// array to pass back data
$data = array ();
2018-12-31 11:57:32 +00:00
2019-03-14 09:04:32 +00:00
$location = str_replace ( '\\' , '/' , getcwd ());
$currentLocation = explode ( " / " , $location );
array_pop ( $currentLocation );
array_pop ( $currentLocation );
$desiredLocation = implode ( " / " , $currentLocation );
$autoLoadFile = $desiredLocation . '/' . 'vendor' . '/' . 'autoload.php' ;
if ( file_exists ( $autoLoadFile )) {
$data [ 'install' ] = 0 ;
2019-01-25 11:52:59 +00:00
} else {
2019-03-14 09:04:32 +00:00
$data [ 'install' ] = 1 ;
$data [ 'composer' ] = 'Composer dependencies is not Installed.Go to root of project, run "composer install" command to install composer dependencies & refresh page again.' ;
2019-01-25 11:52:59 +00:00
}
2018-12-31 11:57:32 +00:00
2019-01-24 05:33:11 +00:00
// return a response
2018-12-31 11:57:32 +00:00
//return all our data to an AJAX call
2019-01-24 05:33:11 +00:00
2018-12-31 11:57:32 +00:00
echo json_encode ( $data );