How to call php file in nodejs

48 views
Skip to first unread message

Benaya Paul

unread,
Nov 13, 2014, 4:20:34 AM11/13/14
to nod...@googlegroups.com
Can you please tell me how to call php file in nodejs

Hage Yaapa

unread,
Nov 13, 2014, 8:34:35 AM11/13/14
to nod...@googlegroups.com
Use the child_process module - http://nodejs.org/api/child_process.html


On Nov 13, 2014, at 2:50 PM, Benaya Paul <benay...@gmail.com> wrote:

Can you please tell me how to call php file in nodejs

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/f0085a31-39dc-4cf4-9ff0-df60e6cb055f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

// ravi

unread,
Nov 13, 2014, 8:34:37 AM11/13/14
to nod...@googlegroups.com
On Nov 13, 2014, at 4:20 AM, Benaya Paul <benay...@gmail.com> wrote:

Can you please tell me how to call php file in nodejs



You could child_process to exec/spawn the PHP interpreter passing it the PHP script to run as an argument. There are also simpler modules available that give you an “exec” call that synchronously returns the output of an external command. I’d recommend the latter if your need is simple. If you need specific links let me know.

—ravi


Reply all
Reply to author
Forward
0 new messages