PHP的memcached getversion报Notice解决方法

WBOY
Release: 2016-06-13 11:52:21
Original
869 people have browsed it

PHP的memcached getversion报Notice
Notice: Memcache::getversion() [memcache.getversion]: Server 127.0.0.1:8080 (tcp 11211) failed with: Failed reading line from stream (0) in D:\phpProject\PCSYs\test.php on line 6

<br /><br />$memcache = new Memcache;<br />$memcache->connect('127.0.0.1:8080', 11211) or die ("Could not connect");<br /><br />$version = $memcache->getVersion();<br />
Copy after login


memcached应该已经装好了,否则在connect时就会报错。
是Windows的wamp环境

请教大家如何解决
------解决方案--------------------
你连接就有问题
$memcache->connect('127.0.0.1', 11211) or die ("Could not connect");

connect(服务器地址, 端口号)
------解决方案--------------------
明显是连接不到memcache。

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!