PHP的memcached getversion报Notice
Jun 23, 2016 pm 02:00 PM 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();
memcached应该已经装好了,否则在connect时就会报错。
是Windows的wamp环境
请教大家如何解决
回复讨论(解决方案)
你连接就有问题
$memcache->connect('127.0.0.1', 11211) or die ("Could not connect");
connect(服务器地址, 端口号)
明显是连接不到memcache。
多谢楼上两位

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon
