Answer the question
In order to leave comments, you need to log in
What is the easiest way to run console php utilities (composer) through another php file?
I need to run composer through my code i.e. I am writing a small script that should expand the site on some event, while exec and similar functions are often blocked, because. composer is an archive of php files, then I thought maybe you can just include it and run it yourself?
maybe something is ready? those. something like
<?php
$lib = new lib('./composer.phar');
$lib->run('install');
$_SERVER['argv'][1] = 'install';
include __DIR__ . '/composer.phar';
Answer the question
In order to leave comments, you need to log in
a small script that, on some event, should expand the site
while exec and similar functions are often blockedSo deal with the cause, not the effect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question