(sorry for top post, still not worked out how not to on phone) Can you not just code it like you normally would any app that doesn't use a framework? I've been writing some cli data importers at work. Basic really, with only classes used that I need, no framework needed (its very simple) and all the output is just echo statements with new lines rather than <br> tags.
getopt() is your friend for command line arguments, but not all windows systems will support it, although Linux is fine. Thanks, Ash http://www.ashleysheridan.co.uk ----- Reply message ----- From: "la...@garfieldtech.com" <la...@garfieldtech.com> Date: Fri, Jan 7, 2011 16:55 Subject: [PHP] Command line PHP To: <email@example.com> Hi folks. I have a project coming up that will involve writing a non-trivial command line PHP application. Most of it will be nice and abstracted and standalone and all of that jazz, but it will need to do command line interation. I'm not sure yet if it will be interactive or if I just need to parse lots of command line switches. Has anyone used a CLI-handling library they like? I recall briefly using the PEAR CLI library many many years ago and disliking it because it was only barely a step above the raw PHP-CLI SAPI, and still required lots of if-else branching in my code. I don't know if there's anything better since then, however. I prefer clean OO to procedural, but can work with procedural if needs be. The fewer dependencies it has the better as well. Any recommendations? (Open source, GPLv2-compatible required.) --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php