Php使用RabbitMQ 入门小demo
1.首先需要安装PHP使用的RabbitMQ 包:php-amqplib composer require php-amqplib/php-amqplib php必须安装拓展:php_sockets,不然会报错: The requested PHP extension ext-sockets * is missing from your system. Install or enable PHP's sockets extension. 2.建立服务端和客户端: server.php <?php // +---------------------------------------------------------------------- // | 蜜蜂到店 // +---------------------------------------------------------------------- // | Copyright (c) 2017 http://www.mifengdaodian.com All rights reserved. // +---------------------------------------------------------------------- // | Author: DB <m18108447675@gmail.com