A
A
Anton2016-06-25 11:49:48
open server
Anton, 2016-06-25 11:49:48

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

3 answer(s)
A
Anton, 2016-06-25
@Yadalay

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;
}

Composer was installed in the current folder. Laravel can be installed in the same way.

D
Dmitry Evgrafovich, 2016-06-25
@Tantacula

make a bash script and run it via exec() php function.

I
IPv4, 2016-06-25
@IPv4

Discussed here . Should come up.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question