Home > Article > Backend Development > 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
$memcache = new Memcache;$memcache->connect('127.0.0.1:8080', 11211) or die ("Could not connect");$version = $memcache->getVersion();
你连接就有问题
$memcache->connect('127.0.0.1', 11211) or die ("Could not connect");
connect(服务器地址, 端口号)
明显是连接不到memcache。
多谢楼上两位