0

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?

Community
  • 1
  • 1
Ben
  • 60,438
  • 111
  • 314
  • 488

1 Answers1

0

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.

OmnipotentEntity
  • 16,531
  • 6
  • 62
  • 96