Toon posts:

[php] via exec() programma opstarten (win2k)

Pagina: 1
Acties:
  • 65 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik wil vanuit een php-script een ander programma opstarten, maar ik wil dat het script wel gewoon verder gaat.
Als ik
PHP:
1
 exec("start <program>");
uitvoer dan blijft het script wachten totdat <program> klaar is.
Heeft iemand enig idee hoe ik dit op kan lossen (ik run onder win2k)

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 20-08 11:40

gorgi_19

Kruimeltjes zijn weer op :9

Note: If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends.
offtopic:
JonkieXL is traaaaaaag :P :+

[ Voor 17% gewijzigd door gorgi_19 op 22-06-2003 19:53 ]

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • pjonk
  • Registratie: November 2000
  • Laatst online: 29-12-2025
Uit de PHP manual bij exec

Note
If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends.

Dus moet je iets doen like exec("program.exe > c:\dummy.txt");
edit:
Ik moet sneller leren typen :7

[ Voor 9% gewijzigd door pjonk op 22-06-2003 19:52 ]

It’s nice to be important but it’s more important to be nice


Verwijderd

Topicstarter
ik heb al geprobeerd de output te redirecten:
PHP:
1
2
3
4
exec("program.exe > output.txt");
//en
exec("start programstart.bat");
//met in 'programstart.bat' :  program.exe > output.txt

maar dit blijkt niet te werken :(

  • TRON
  • Registratie: September 2001
  • Laatst online: 16-08 07:26
Dit is volgens mij te ondervangen door:
PHP:
1
2
3
<?
exec ("start.exe /w programstart.bat");
?>
te gebruiken.

Leren door te strijden? Dat doe je op CTFSpel.nl. Vraag een gratis proefpakket aan t.w.v. EUR 50 (excl. BTW)


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 13-08 16:46

curry684

left part of the evil twins

Jaja www.php.net de gekste. Dit is manualwerk, zoek zelf maar op.

Professionele website nodig?

Pagina: 1

Dit topic is gesloten.