PHP Command Line Tool
Recently, work with my colleague and find out a very useful PHP tool.
Here is how I install that
> wget https://psysh.org/psysh
> chmod +x psysh
> ./psysh
Then in the command line tool, I can connect to my mysql with PDO
Psy Shell v0.9.9 (PHP 7.1.23 — cli) by Justin Hileman
>>> $dbh = new PDO('mysql:host=167.99.xxx.xxx;port=4006;dbname=xxxx’,’user’,'password');
Put that into the PATH even better
> sudo mv ./psysh /opt/local/bin/
Then I can run PHP command line in the tool
> psysh
Psy Shell v0.9.9 (PHP 7.2.12 — cli) by Justin Hileman
>>> $hello = 'Hello';
=> "Hello"
>>> $hello .= ' world!';
=> "Hello world!"
>>> echo $hello;
Hello world!⏎
>>> exit
Exit: Goodbye
References:
https://blog.csdn.net/zhanghao143lina/article/details/70183698
https://github.com/bobthecow/psysh
https://segmentfault.com/a/1190000008427477
分享到:
相关推荐
the tool will do it automatically. 2. Just place the target files in the encoded directory. Then run one of the following executables. zend.exe - Decodes the following: Zend (Expired), Nu-Coder...
PharTools是功能强大PHP-CLI工具,用于管理phar(PHP存档)文件。 它允许创建,提取,转换,编辑和查看phar档案。 它还包括一个简单的API,可在您自己的脚本上实现PharTools功能。 不要直接运行此脚本。 而是从cmd....
开源项目-EdwinHoksberg-beanstalkd-cli.zip,Show /r/golang: A commandline tool for managing a beanstalkd queue
web8p是用于将图像转换为webp格式的命令行工具 如何安装 ...# check hash against the one published under releases sha256sum webp8.phar # make phar executable chmod +x webp8.phar # rename phar (optional) ...
You will then cover command-line applications, API module, volt syntax, and hierarchical views. Installing and working with Node and Bower for assets management will also be covered. Finally, you ...
** Includes a command line for batch conversion of single files, single directories or directory trees (use the command line API in your own program!) ** Verifies SQL syntax with detailed error ...
* Command Line Interface * PHP Bridges for connecting to MySQL, PostgreSQL, and SQL Server databases remotely via PHP enabled web servers * An ASP bridge for connecting to MS SQL Server databases ...
} 然后,在常规类中,您可以在Partyline外观上调用任何公共Illuminate\Console\Command方法,就像在命令类内部一样。 Partyline :: info ( 'foo' );// Equivalent to $this->info('foo') within your command.安装...
$cli = new \Symfony\Component\Console\Application('Drest Server Command Line Interface Tool'); $cli->setCatchExceptions(true); $cli->setHelperSet($helperSet); $cli->addCommands(array( // ...
PHP恶意软件扫描器 遍历具有php扩展名的文件的目录,并根据文本或正则表达式规则,基于自收集样本的规则和可公开获得的恶意软件/ webshell测试文件。 目标是找到受感染的文件并与小孩子作斗争,因为它们容易绕过...
14. **命令行工具(Command Line Tool)**:通过命令行工具,开发者可以进行自动化部署、数据库迁移等任务,提高开发效率。 15. **扩展开发**:手册还会介绍如何扩展ThinkPHP2.0框架,包括自定义标签库、行为...
Create a custom user tool to compile Java code, using the command line, from within UltraEdit Configure UltraEdit with javascript lint How to check your JavaScript source code for common mistakes ...
在PHP开发过程中,调试是必不可少的一个环节,Xdebug作为一个强大的PHP扩展,提供了丰富的调试和分析功能,如变量追踪、断点设置、性能分析等。本文将深入探讨如何使用`xdebug.sh`脚本来从命令行方便地开启和关闭...
- 在Cacti管理界面,配置数据采集方法,如SNMP(Simple Network Management Protocol)或者CLI(Command Line Interface)。 - 添加网络设备,指定设备的IP地址、SNMP版本和社区字符串(如果适用)。 - 设定数据...
Both the command line for the process and the CEdit control are specified by the caller. Using the class is simple, as shown in the following: CRedirect Redirect("C:\\Temp\\sample.bat", m_Edit);...
:stopwatch: PHP性能工具 :hammer_and_wrench: 建立:大师|开发突出轻松衡量跨多个平台PHP脚本的性能支持Laravel框架» 支持界面Web,Web控制台和命令行将结果导出到类,文件或json字符串»打印有关PHP版本,最长...
Advanced Archive Password Recovery recovers passwords and removes protection from ZIP and RAR archives created with all versions of PKZip, WinZip, RAR and WinRAR in their GUI and command-line ...
PHP版本5.3.6或更高版本 PHP-curl模块 PHP-ftp模块 PHP-mbstring模块 安装 使用以下命令检出carddav2fb源文件及其相关子项目: git clone https://github.com/carlos22/carddav2fb.git 现在,您应该已经进行了所有...
- **命令行工具(Command Line Tool)**:Doctrine提供了一个命令行工具,允许开发者通过简单的命令来生成实体类。这些命令通过读取元数据文件来创建对应的PHP类文件。 - **实体类的作用(Purpose of Entity Classes...