将server.js中的数据发送到要处理的PHP文件

时间:2016-09-21 22:49:13

标签: javascript php jquery node.js post

当我从客户端提交表单时,表单中的相关数据在我的服务器上显示为req.body。我想将该数据传递给PHP文件进行处理。我不知道如何运行PHP文件并从js文件中传递一个参数。



app.post('/contactengine.php' ,function ( req, res ){
  data = req.body
  //the data is showing up here correctly.
  //I would like to take data and get it processed by contactengine.php can anyone help?  I dont know how to run the PHP file and pass it an argument.
});




0 个答案:

没有答案