search
HomePHP FrameworkSwooleThe latest swoole-cli can support Windows environment!

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.

The latest swoole-cli can support Windows environment!

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

The latest swoole-cli can support Windows environment!

To use

, you first need to configure the decompressed folder/bin directory into the system's Path environment variable.

The latest swoole-cli can support Windows environment!

The latest swoole-cli can support Windows environment!

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.

The latest swoole-cli can support Windows environment!

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(&#39;127.0.0.1&#39;, 9501, SWOOLE_BASE);
$http->on(&#39;start&#39;, function ($server) {
    echo "Swoole http server is started at http://127.0.0.1:9501\n";
});
$http->on(&#39;request&#39;, function ($request, $response) {
    $response->header(&#39;Content-Type&#39;, &#39;text/plain&#39;);
    $response->end(&#39;Hello World&#39;);
});
$http->start();

Run:

The latest swoole-cli can support Windows environment!

Open the browser and enter http:// You can see the results at 127.0.0.1:9501/.

The latest swoole-cli can support Windows environment!

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!

Statement
This article is reproduced at:Swoole官方公众号. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SecLists

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

WebStorm Mac version

Useful JavaScript development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

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