在 Node.js Web 服务器中执行 PHP 脚本 [英] Execute PHP scripts within Node.js web server
本文介绍了在 Node.js Web 服务器中执行 PHP 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
拥有 Node.js Web 服务器功能(如 Apache 执行 PHP 脚本)需要哪些步骤?有什么方法可以在 Node.js 中集成 PHP?
What steps are necessary to have a Node.js web server function like Apache executing PHP scripts? Any way to integrate PHP within Node.js?
注意:我不想直接在 Node.js 中执行 PHP 脚本,而是通过 Apache 实例或类似的东西路由".
Note: I don't want to execute PHP scripts directly within Node.js but "routed" through an Apache instance or something similar.
推荐答案
Node.js 仅支持 JavaScript.这是一个关于如何让 PHP 与 Node.js 一起运行的教程.
Node.js only supports JavaScript. Here is a tutorial on how to have PHP running with Node.js on the side.
http://blog.mixu.net/2011/01/04/nginx-php-fpm-and-node-js-install-on-centos-5-5/
这篇关于在 Node.js Web 服务器中执行 PHP 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文