我有这个代码
$status = array(
"message"=>"error",
"club_id"=>$_club_id,
"status"=>"1",
"membership_info"=>array(),
);
Run Code Online (Sandbox Code Playgroud)
echo json_encode($status);
这个函数返回json:
{"message":"error","club_id":275,"status":"1","membership_info":[]}
但我需要像这样的json:
{"message":"error","club_id":275,"status":"1","membership_info":{}}
每当我尝试运行此代码时
example@testserver:~$ sudo apt-get install php5-xdebug
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-xdebug
Run Code Online (Sandbox Code Playgroud)
我收到此错误"E: Unable to locate package php5-xdebug"
请帮助谢谢
如果有关于为什么我们在类型脚本中使用尖括号 <> 的任何教程,请帮助我,例如我在这里给出了一些代码我需要解释。
export class HomePage {
constructor(public navCtrl: NavController) {
let a = this.testfunc<boolean>(4);
console.log(a);
}
testfunc<T>(s) {
return s;
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢
<file path="catalog/view/javascript/common.js">
<operation>
<search><![CDATA['add': function(product_id, quantity) {]]></search>
<add position="replace">
<![CDATA['add': function(product_id, m, quantity) {
alert('ok');
quantity = m*quantity;
]]>
</add>
</operation>
Run Code Online (Sandbox Code Playgroud)
这是我的xml,我在ocmod.log中也没有收到错误,请帮忙