Jump to content

Restart a php script


Nitroware

Recommended Posts

Ok, I am writing a php CLI interface for linux, as a helper app.  It runs similar to mysql (with the "mysql>" type sessions).  The annoying part about it, is that whenever I change anything, I have to type exit, then the applet name again.  Its not that bad, but after a while, It gets annoying.  So what I want to be able to do is type "restart", and it will reload the php file.  If anybody has any ideas, it would be greatly appreciated!

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/114149-restart-a-php-script/
Share on other sites

make sure .bash_aliases is uncommented in .bash_rc in your home directory, then open it up in your favourite editor, and add this line:

alias myphp='php /path/to/script.php'

 

Then log off, and log back on. All you have to do to launch your script now is type myphp and press enter :)

Link to comment
https://forums.phpfreaks.com/topic/114149-restart-a-php-script/#findComment-587022
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.