// 追加写入用户名下文件 $code="001";//动态数据 $json_string = file_get_contents("hackhp.json");// 从文件中读取数据到PHP变量 $data = json_decode($json_string,true);// 把JSON字符串转成PHP数组 $data[$code]=array("a"=>"as","b"=>"bs","c"=>"cs"); $json_strings = json_encode($data); file_put_contents("hackhp.json",$json_strings);//写入 //修改 $json_string = file_get_contents("hackhp.json");// 从文件中读取数据到PHP变量 $data = json_decode($json_string,true);// 把JSON字符串转成PHP数组 $data["001"]["a"]="aas"; $json_strings = json_encode($data); file_put_contents("hackhp.json",$json_strings);//写入
SQL语句执行错误:SELECT * FROM emlog_sort where pid= ORDER BY sid ASC, taxis asc
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY sid ASC, taxis asc' at line 1