承接 samdark/yii2-webshell 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

samdark/yii2-webshell

最新稳定版本:2.0.0

Composer 安装命令:

composer require samdark/yii2-webshell

包简介

A web shell that allows to run yii console commands and create your own commands.

README 文档

README

Web shell allows to run yii console commands using a browser.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist samdark/yii2-webshell "~2.0" 

or add

"samdark/yii2-webshell": "~2.0" 

to the require section of your composer.json file.

Configuration

To use web shell, include it as a module in the application configuration like the following:

return [ 'modules' => [ 'webshell' => [ 'class' => 'samdark\webshell\Module', // 'yiiScript' => Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script ], ], // ... other application configuration ]

With the above configuration, you will be able to access web shell in your browser using the URL http://localhost/path/to/index.php?r=webshell

Access control

By default access is restricted to local IPs. It could be changed via allowedIPs property. Additionally, checkAccessCallback is available to be able to introduce custom access control:

return [ 'modules' => [ 'webshell' => [ 'class' => 'samdark\webshell\Module', // 'yiiScript' => Yii::getAlias('@root'). '/yii', // adjust path to point to your ./yii script 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.2'], 'checkAccessCallback' => function (\yii\base\Action $action) { // return true if access is granted or false otherwise return true; } ], ], // ... other application configuration ]

Limitations

Web shell is unable to work interactively because of request-response nature of web. Therefore you should disable interactive mode for commands.

统计信息

  • 总下载量: 78.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 229
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 226
  • Watchers: 31
  • Forks: 36
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固