note 90042 added to features.commandline
| From: | grant dot alexander at pfolsen dot com | Date: | Thu, 02 Apr 2009 20:20:32 +0000 |
| Subject: | note 90042 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152772@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 213.249.64.162
Probable Submitter: 203.97.23.130
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit -- https://master.php.net/note/edit/90042
Del: integrated -- https://master.php.net/note/delete/90042/integrated
Del: useless -- https://master.php.net/note/delete/90042/useless
Del: bad code -- https://master.php.net/note/delete/90042/bad+code
Del: spam -- https://master.php.net/note/delete/90042/spam
Del: non-english -- https://master.php.net/note/delete/90042/non-english
Del: in docs -- https://master.php.net/note/delete/90042/in+docs
Del: other reasons-- https://master.php.net/note/delete/90042
Reject -- https://master.php.net/note/reject/90042
Search -- https://master.php.net/manage/user-notes.php