当我们在用coreseek或 单纯的sphinx时,如果我们在程序中调用api过程中,函数返回false,这种情况下该如何调试呢? 如: $res = $cl-Query($searchkey, 'myIndex');//var_dump($res);die; 如果Qquery出错,那么$res 只会返回false,而不会返回具体的错误信息
当我们在用coreseek或 单纯的sphinx时,如果我们在程序中调用api过程中,函数返回false,这种情况下该如何调试呢?
如:
$res = $cl->Query($searchkey, 'myIndex'); //var_dump($res);die;
如果Qquery出错,那么$res 只会返回false,而不会返回具体的错误信息的,这种情况下,我们可以用
GetLastError 方法来获取最后的具体出错信息!!
var_dump($cl->GetLastError());
原文地址:【原创】sphinx api调用出错后,如何调试, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version