I have the next config into my angularjs:
var config={ //config post
method:"POST",
url:"http://localhost/APIREST/controllersencillo",
params: {tabla : "PintaMonas"}, //without id is insert, with id is update
data: {PMcolor: "Azul tostado", PMpartes: "Un poquito de las orjeas y un bigote a lo Dali, quizas le alegre la cara", PMcosteTotal: "445" }
}
When i call to the server work perfectly, this isn't the problem. The problem it's how get the data .
My function POST of my server is:
$arrayDatos = $this->post('datosSend');
echo 'Tipe of data: '.gettype($arrayDatos);
print_r($arrayDatos);
die();
Any solution? I didn't find anything similar in the web (include stack overflow).
Thanks in advance.
试试这个$arrayDatos = $_POST;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.