#!/usr/local/bin/php -q
<?php
function read() {
$fp=fopen("/dev/stdin", "r");
$input=fgets($fp, 255);
fclose($fp);
return $input;
}
print("What is your first name? ");
$first_name = read();
print("What is your last name? ");
$last_name = read();
print("\nHello, $first_name $last_name! Nice to meet you!\n");
?>
<?php
function read() {
$fp=fopen("/dev/stdin", "r");
$input=fgets($fp, 255);
fclose($fp);
return $input;
}
print("What is your first name? ");
$first_name = read();
print("What is your last name? ");
$last_name = read();
print("\nHello, $first_name $last_name! Nice to meet you!\n");
?>
http://www.phpe.net/articles/370.shtml
http://www.thismail.org/bbs/redirect.php?tid=2854&goto=lastpost
原始来源老外的网站:http://www.phpbuilder.com/columns/darrell20000319.php3?page=2
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/1388/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2008-11-13 11:33
评论列表