I've just installed PHP for command line programing on my PC and i'd like some examples and maybe some tutorials on how to do things, the one's i've found seem to be all the same basic fundamental things. So has anyone got or know of somewhere that has command line scripts written in PHP i could have a look at?
And one other thing, when i run a script, it runs through it but then closes the window at the end unless i run it from the command prompt. Any ideas on how to stop that?
Thanks, Peter
CLI
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Re: CLI
Command line scripts are exactly the same as normal scripts, with some minor alterations. Particularly the inputs. $_SERVER has the details.PeterBailey wrote:I've just installed PHP for command line programing on my PC and i'd like some examples and maybe some tutorials on how to do things, the one's i've found seem to be all the same basic fundamental things. So has anyone got or know of somewhere that has command line scripts written in PHP i could have a look at?
That would be a setting in your operating system. PHP has no control of that.PeterBailey wrote:And one other thing, when i run a script, it runs through it but then closes the window at the end unless i run it from the command prompt. Any ideas on how to stop that?
-
PeterBailey
- Forum Newbie
- Posts: 2
- Joined: Wed Jul 11, 2007 5:57 am
I know it doesn't, looked in the settings and couldn't find out how to disable it but i can live with it for now.
I know it's the same, i can do silly things like echo, loop, deal with user input etc but not anything proper. Just wanted to see what other people can do with it - i can only think of file manipulation and calculators.
I know it's the same, i can do silly things like echo, loop, deal with user input etc but not anything proper. Just wanted to see what other people can do with it - i can only think of file manipulation and calculators.