Nitroware Posted July 10, 2008 Share Posted July 10, 2008 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 More sharing options...
trq Posted July 10, 2008 Share Posted July 10, 2008 The only thing I can think of would be to use exec() or something similar to execute the script again. Doing this however would spawn a new process and really, its probably not what you want to do. Link to comment https://forums.phpfreaks.com/topic/114149-restart-a-php-script/#findComment-587011 Share on other sites More sharing options...
lvtrii Posted July 10, 2008 Share Posted July 10, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.