-5
为什么不是代码适用?PHP strpos无法正常工作
output = {"Response":"<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\"><soap:Body><LeadEntryResponse xmlns=\"http:\/\/www.abc.com\/\"><LeadEntryResult><AFFILIATES_LEAD xmlns=\"\"><STATUS><LEAD_STATUS>REJECTED<\/LEAD_STATUS><REMARK> LEAD ALREADY EXSITS - <\/REMARK><\/STATUS><\/AFFILIATES_LEAD><\/LeadEntryResult><\/LeadEntryResponse><\/soap:Body><\/soap:Envelope>"}
key = LEAD ALREADY EXSITS
//CODE
if (strpos($output,$key) !== false)
{
echo "success";
}
输出和密钥来自数据库表。
[DEMO](http://ideone.com/cFlURB)示出它的工作 –
堆栈溢出驱动发展 – m4t1t0