引用示例文档:\api\test_coreseek_rtindex.php
// -------------------------------------------------------------------------- header("Content-Type:text/html; charset=UTF-8"); #连接到实时索引,使用MySQL41协议 $link = mysql_connect('localhost:9306') or die('connect bad'); if (!$link) { echo mysql_errno() . ": " . mysql_error(). "\n"; exit; } else { echo "搜索服务:连接成功\n"; }
#查询id为1的文档 $id=1; $query=mysql_query("SELECT * FROM rtindex WHERE id=$id");
( ! ) Warning: mysql_query() [function.mysql-query]: EOF packet expected, field count wasn't 0xFE but 0x 0 in E:\www\demo\sphinx\test_coreseek_rtindex.php on line 28
试了4.0\4.1两个版本都有问题,而且现在好像只有第一次query的时候报错。现在还不知道解决!请各位帮查一下什么原因?
本机环境:windows7+apache2.2+mysql5.5.8 |