已采納回答 / 憶軍
在數據庫$pdo這塊添加// 數據庫$pdo = new PDO('mysql:host=localhost;dbname=restful;charset=utf8','root','root');$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);return $pdo;這樣就不會出現int轉化為string了,這是預處理問題導致的
2017-09-22
已采納回答 / 慕后端9595255
DELETE:$.ajax({ ? ?url: '/script.cgi', ? ?type: 'DELETE', ? ?success: function(result) { ? ? ? ?// Do something with the result ? ?}});PUT:$.ajax({ ? url: 'script.php', ? type: 'PUT', ? success: function( response ) { ? }});
2017-08-20