小编juk*_*rok的帖子

Laravel 5 - How to create an Artisan command to execute bash script

I want to get an artisan command to run a bash script when executed.

So I've created an artisan command using the following

php artisan make:command backupList --command=backup:list

And here is backupList.php

<?php

namespace App\Console\Commands;

require_once __DIR__ . '/vendor/autoload.php'; 

use Illuminate\Console\Command;


class backupDB extends Command
{

protected $signature = 'backup:list {name}';

protected $description = 'Database backup tool';



public function __construct()
{
    parent::__construct();
}



public function handle()
{
    $this->exec('ls -la');
}
}
Run Code Online (Sandbox Code Playgroud)

In handle() exec and shell_exec don't seem to work, …

ubuntu laravel-5

5
推荐指数
2
解决办法
7053
查看次数

将文件从我的计算机上传到ubuntu服务器

我通过腻子(ssh)连接到Ubuntu服务器。我希望能够将文件从我的计算机上传到服务器。我要上传的文件是.zip文件,因此有什么限制吗?我正在使用Windows 7 OS。请帮忙。

ubuntu server

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

ubuntu ×2

laravel-5 ×1

server ×1