开发者

PHP command line - updating the output [duplicate]

This question already has answers here: 开发者_开发知识库 Closed 11 years ago.

Possible Duplicate:

Update Command-line Output, i.e. for Progress

Is it possible in PHP to update the output of PHP via command line? For instance, echo "50%"; will add that to the output, how can I make it so that it shows Updating files... 41% but the % changes based on the progress of the script?


You have two options, either you can simply print \r or \b, \r returns you to the beginning of the line, \b goes back a single space.

If you want to have more control than this I would suggest using the curses library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜