nodejs、php命令行交互模式
一、NODE JS:
- 代码:
test.jsvar readline = require('readline'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question("what is your name?", function(result) { console.log(result) rl.close(); });
- 测试:
二、PHP:
- 代码:
test.php - 测试:
本文名称:nodejs、php命令行交互模式
网站链接:http://azwzsj.com/article/gjsegg.html