0

I have to read a full line from stdin. When I use fscanf it reads only string before a space. I need to read a whole line inluding spaces. Any ideas how can I achieve this?

4

1 回答 1

1

尝试

$line = fgets();

PHP手册说:

描述

字符串 fgets ( 资源 $handle [, int $length ] )

从文件指针获取一行。

于 2016-03-04T07:21:29.617 回答