This article brings you the relevant implementation steps for swoole-cli to support the Windows environment. The latest swoole-cli supports the Windows environment and is based on cygwin64. You can download it and use it. I hope it will be helpful to everyone.
Recommended learning: swoole video tutorial
The latest swoole-cli supports Windows environment and is implemented based on cygwin64. Download and use.
Download
A newly installed Windows
machine (must be a 64
-bit system) does not need to install any php
related Software package, you can directly download the executable program zip
compressed package of swoole-cli-cygwin64
, and then unzip it to any directory.
swoole-cli is installation-free and can be used directly
Download address: https://github.com/swoole/swoole-src/releases /download/v4.8.7/swoole-cli-v4.8.7-cygwin64.zip
swoole-cli will be released simultaneously with swoole. You can download the latest version of swoole from the github release page -cli
To use
, you first need to configure the decompressed folder/bin directory into the system's Path environment variable.
Use win r to enter cmd to enter the Windows command line. You can use the swoole-cli command to execute the swoole or php program.
Extensions
swoole-cli contains various commonly used extensions, the list is as follows:
If you want to add extensions To swoole-cli, you can submit an issue on the official github homepage of swoole
The PHP version used by swoole-cli is 8.1.1
D:\>swoole-cli -m [PHP Modules] bcmath bz2 Core ctype curl date dom exif fileinfo filter gd gmp hash iconv imagick json libxml mbstring mysqli mysqlnd openssl pcre PDO pdo_mysql pdo_sqlite Phar posix redis Reflection session SimpleXML soap sockets sodium SPL sqlite3 standard swoole tokenizer xml xmlreader xmlwriter xsl yaml zip zlib [Zend Modules]
Start the Web server
Write the simplest Web service for testing. The file name is server.php:
<?php $http = new Swoole\Http\Server('127.0.0.1', 9501, SWOOLE_BASE); $http->on('start', function ($server) { echo "Swoole http server is started at http://127.0.0.1:9501\n"; }); $http->on('request', function ($request, $response) { $response->header('Content-Type', 'text/plain'); $response->end('Hello World'); }); $http->start();
Run:
Open the browser and enter http:// You can see the results at 127.0.0.1:9501/.
Recommended learning: swoole tutorial
The above is the detailed content of The latest swoole-cli can support Windows environment!. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software