PHP pop() Funzione
❮ Riferimento al file system PHPEsempio
Apri una pipe al programma specificato nel parametro del comando :
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
Definizione e utilizzo
La funzione popen() apre una pipe al programma specificato nel parametro del comando.
Sintassi
popen(command, mode)
Valori dei parametri
Parameter | Description |
---|---|
command | Required. Specifies the command to execute |
mode | Required. Specifies the connection mode. Can be "r" (Read only) or "w" (Write only - opens and clears existing file or creates a new file) |
Dettagli tecnici
Valore di ritorno: | FALSO in caso di fallimento |
---|---|
Versione PHP: | 4.0+ |
❮ Riferimento al file system PHP