-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