note 90042 deleted from features.commandline by danbrown
| From: | danbrown@php.net | Date: | Thu, 02 Apr 2009 20:22:22 +0000 |
| Subject: | note 90042 deleted from features.commandline by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152773@lists.php.net to get a copy of this message | ||
Note Submitter: grant dot alexander at pfolsen dot com
Reason: useless
----
I would like to be able to parameterise my script so that it can be run as a preview in a browser or
as a cli script. The application is that we generate an html newsletter which is sent out via an
on-line service, and we also create an archive which goes up onto our website. There are somethings
in the version that is e-mailed that I don't want included in the Archive. I also need to be
able to provide the Editor with a view so he can review either version.
For the cli I would like to be able to enter:
php -f script.php -- {e-mailed | archive) >output.html
For the preview the URL should be:
http://localhost/newsletter?ver=e-mailed |
archive
Down the track, the e-mailed version will only have the abbreviated version of the newsletter with
links back to the full story on the Archive version, but I have'nt got that sophisticated yet.