一个 PHP 的 websocket 的聊天室
具体设计可查看:网页实时聊天之PHP实现websocket
websocket chatroom.
一个 PHP 的 websocket 的聊天室
具体设计可查看:网页实时聊天之PHP实现websocket
Hi, your code server.php
seems well done but it fails when I'm running it with the command below:
php server.php
The exact error is shown below:
PHP Fatal error: Uncaught Error: Call to undefined function socket_create() in D:\Trashes\websocket-master\server.php:24
detailed screenshot is shown below:
It seems that the server side has some problems on platform compatibility.
May you give me some advice on running it or any suggestions on developing WebSocket related server based on a Windows platform using PHP is warmly welcome!
运行server.php报错了:
Parse error: syntax error, unexpected '[' in D:\www\chat2\server.php on line 19
1、$pid = function_exists('posix_getpid')?posix_getpid():get_current_user(); 可以兼容windows。
2、代码要在php 5.6上运行。
假设有ABC三个用户登录,链接上了服务端。那么如何区分这三个不同的链接,因为我想实现 A发送一个消息 只推送给B的功能。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.