note 59314 rejected from features.commandline by nlopess
| From: | nlopess@php.net | Date: | Fri, 02 Dec 2005 19:55:00 +0000 |
| Subject: | note 59314 rejected from features.commandline by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-99487@lists.php.net to get a copy of this message | ||
Note Submitter: jyrgen at gmx dot de
----
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