Mailinglisten-Archive |
Hi Stephan,
> aber jetzt das ganze nochmal von vorne und anders aufgesetzt.
> bitte probiert doch bei euch mal folgende Geschichte aus:
> (natürlich mit angepassten Pfaden)
logo ...
shell.test.1.php
<?php
$file = 'shell.test.2.php';
$path = 'd:/home/ftproot/htdocs/';
echo system('php -q '.$path.$file);
?>
shell.test.2.php
<?php
$file = 'shell.test.log';
$path = 'd:/home/ftproot/htdocs/';
$fp = fopen($path.$file, 'a');
$wr = fputs($fp, date('d.m.y-H:i:s', time()).' - '.__FILE__."\n");
fclose($fp);
?>
erzeugt shell.test.log mit:
10.07.05-01:48:10 - d:/home/ftproot/htdocs/shell.test.2.php
10.07.05-01:48:16 - d:/home/ftproot/htdocs/shell.test.2.php
10.07.05-01:48:19 - d:/home/ftproot/htdocs/shell.test.2.php
10.07.05-01:49:27 - d:/home/ftproot/htdocs/shell.test.2.php
10.07.05-01:49:36 - d:/home/ftproot/htdocs/shell.test.2.php
10.07.05-01:49:59 - d:/home/ftproot/htdocs/shell.test.2.php
10.07.05-01:50:34 - d:/home/ftproot/htdocs/shell.test.2.php
alles andere haette mich auch verwundert.
Das "echo" vor system(...) kann man weglassen, weil es nur
die Ausgaben von 'shell.test.2.php' wiederholen wuerde.
UND:
Wenn Du eine echte Abkopplung der Prozesse brauchst,
musst Du mal nach 'nohup' googlen. Damit bekommt man
echte 'freilaufende' Prozesse erstellt. Gibt es fuer
Windows und fuer Linux/Unix und wird IMHO von Providern
nicht so gerne gesehen ...
m. b. G. Norbert
_____________________
normal: 02682-966898
Notruf: 0163-3613642
---------------------
e.o.m.
php::bar PHP Wiki - Listenarchive