note 59314 added to features.commandline
| From: | jyrgen at gmx dot de | Date: | Fri, 02 Dec 2005 19:00:13 +0000 |
| Subject: | note 59314 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99483@lists.php.net to get a copy of this message | ||
I wrote a rather huge php networking app, with a couple
of require's and functions as well as database interaction. apache
has been used for live logging purposes. the app works as a daemon,
scanning contiously a directory for new files to be processed.
now i want to run the whole thing *without* apache, as a shellscript,
and i'd like to have all text output on the console.
this is the structure of the main script:
main.php
--------
<style> .... </style>
<?
require_once(defs.php);
require_once(functions.php);
...
main();
function main(){
while (true){
/* code */
}
?>
When i invoke 'php main.php ' on the console, it just outputs
the html style attributes and exits. is it impossible to run
a big php daemon app like this ? must i rewrite everything in perl ?
(hopefully not)
thanks for your help and ideas ! jyrgen
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59314
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59314&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59314&report=yes
Search -- http://master.php.net/manage/user-notes.php