|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
line break in PHP script for terminal
I'm runnig a PHP script via my terminal window and have the script echo back results. Is there a way to break lines so that the terminal will understand it as a return instead of just an "\n" in the HTML returned ?
Also, is it possible to set up a loop that will run the script every 10 seconds until I tell it to quite? |
|
#2
|
||||
|
||||
|
1) Make sure you're double quoting the \n's - they need to be interpolated (and should be according to the system architecture). Can you show some code?
2) Easy to run constantly. You can probably do this directly in php, but I'd write a bash script to do it. Code:
#!/bin/bash
# Off the top of my head
# May need to be tweaked :)
while 1
do
php /path/to/script.php
sleep 10
done
__________________
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Mac Help > line break in PHP script for terminal |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|