$fd = STDIN;
fscanf($fd,"%d %d",$a,$b)
用着可以读入系统输入的数据,fscanf($fd,"%d %d",$a,$b)是读入一行数据,返回值是变量的个数。