Answer the question
In order to leave comments, you need to log in
How to run Laravel installation on hosting/server/local?
Good morning!
I want to make sure that the working site has, for example, the "Install Laravel" button, when clicked, Laravel itself will be installed in a different folder. I will then delete this folder from the finished project and use it in the new one. Could you tell me, please, through what commands it can be implemented? I know that you can install through Composer, but how can I run this command on the site, and not in the console?
---
Or another question: how to execute server/console commands through php?
Answer the question
In order to leave comments, you need to log in
This helped me - www.php.su/learnphp/operators/?shell I
created a file with the following php code:
<?php
$output[] = `php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"`;
$output[] = `php -r "if (hash_file('SHA384', 'composer-setup.php') === 'bf16ac69bd8b807bc6e4499b28968ee87456e29a3894767b60c2d4dafa3d10d045ffef2aeb2e78827fa5f024fbe93ca2') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"`;
$output[] = `php composer-setup.php`;
$output[] = `php -r "unlink('composer-setup.php');"`;
foreach ($output as $o) {
echo $o;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question