已采納回答 / 憶軍
在數(shù)據(jù)庫$pdo這塊添加// 數(shù)據(jù)庫$pdo = new PDO('mysql:host=localhost;dbname=restful;charset=utf8','root','root');$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);return $pdo;這樣就不會(huì)出現(xiàn)int轉(zhuǎn)化為string了,這是預(yù)處理問題導(dǎo)致的
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