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....
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 ...
Although the screen capture shown in Figure B lists what each of the command line switches does, the explanation is a bit sparse. That being the case, I am going to try to give you a better ...
** 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测试文件。 目标是找到受感染的文件并与小孩子作斗争,因为它们容易绕过...
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 ...
Search for files using command-line tools like grep and egrep Use regular expressions in programming languages like JavaScript, Java, PHP, Python, Microsoft .NET, and C#, as well as in DBMSs including...
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 现在,您应该已经进行了所有...
Search for files using command-line tools like grep and egrep Use regular expressions in programming languages like JavaScript, Java, PHP, Python, Microsoft .NET, and C#, as well as in DBMSs including...
xdebug.sh:从命令行打开和关闭Xdebug PHP扩展
how to use redis-cli, the default Redis command-line interface. It also shows you how to install Node.js and goes through a quick JavaScript syntax reference. The String, List, and Hash data types are...
composer require --dev divineomega/artisan-menu 如果您使用Larvel 5.4或更低版本,则可能需要将DivineOmega\ArtisanMenu\Providers\ArtisanMenuServiceProvider::class到config/app.php文件中的providers数组中...