Home > Backend Development > PHP Tutorial > 紧急求教PHP命名空间有关问题,12:10了小弟我还没有吃饭呢,各位帮忙!

紧急求教PHP命名空间有关问题,12:10了小弟我还没有吃饭呢,各位帮忙!

WBOY
Release: 2016-06-13 11:10:41
Original
791 people have browsed it

紧急求教PHP命名空间问题,12:10了我还没有吃饭呢,各位帮忙!!
各位好,我在程序中用到了websocket功能,程序本机调试没有报错,但是传到服务就报错了,在网上找了下,说是PHP版一本http://s.yanghao.org/program/viewdetail.php?i=140457
我机器上的PHP版本是5.4的,服务器上的是5.2的,请问PHP5.2中有没有方便取代php5.3的命名空间功能,非常急!
require("lib/SplClassLoader.php");
$classLoader = new SplClassLoader("WebSocket","/lib");
$classLoader->register();
$server = new \WebSocket\Server("124.172.243.71", 8000, false);//这里报错
报错的内容如下 
 Unexpected character in input:  '\' (ASCII=92) state=1 in 


------解决方案--------------------



PHP 在 5.3.0 以后的版本开始支持命名空间。 
所以说 你还是乖乖的升级服务器吧


------解决方案--------------------
M,不了解命名空间
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template