使用 Eclipse/xdebug n Windows 2008 服务器。昨天我能够成功调试一个 php 文件。今天,使用一个非常相似的 php 文件,它正在跳过行然后被遗忘。代码片段:
//$data = file_get_contents('php://input');
$data = '[{"ARDivisionNo":"01","CustomerNo":"ABF","ContactCode":"ARTIE JOHN","CustomerName":"American Business Futures","fname":"Artie ","lname":"Johnson","EmailAddress":"philmcintosh@comcast.net","Billing_Address1":"2131 N. 14th Street","Billing_Address2":"Suite 105","Billing_Address3":"Accounting Department","Billing_City":"Irvine","Billing_State":"CA","Billing_Zip":"92618","UDF_FC_ENABLED":"Y","UDF_FC_CUSTOMERID":2.0,"UDF_FC_ADDRESS_BOOK_ID":3.0,"TelephoneNo1":"","FaxNo":""}]';
$json = json_decode($data, true);
Foreach ($json as $i => $row) {
$customers_id = tep_db_prepare_input($row['UDF_FC_CUSTOMERID']);
$customers_firstname = tep_db_prepare_input($row['fname']);
(出于调试目的,我粘贴了 json - 这昨天在另一个文件中有效。)在这个文件中,第一个奇怪的事情是调试器实际上停止在注释掉的 "$data = file_get_contents('php://input') ;" 线。在下一个“$data =”行之后,它跳到“$customers_id =”行。此时 $data 在变量窗口中显示为空。关于什么是错误的/如何解决的任何想法?