135-1821-9792

nodejs、php命令行交互模式

一、NODE JS:

  1. 代码:
    test.js
    var 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();
    });
  2. 测试:
    nodejs、php命令行交互模式

    二、PHP:

  3. 代码:
    test.php
  4. 测试:
    nodejs、php命令行交互模式

本文名称:nodejs、php命令行交互模式
网站URL:http://kswsj.com/article/gjsegg.html


Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号