PHP popen() İşlev
❮ PHP Dosya Sistemi ReferansıÖrnek
Komut parametresinde belirtilen programa bir boru açın :
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
Tanım ve Kullanım
popen() işlevi, komut parametresinde belirtilen programa bir boru açar.
Sözdizimi
popen(command, mode)
Parametre Değerleri
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) |
Teknik detaylar
Geri dönüş değeri: | Başarısızlıkta YANLIŞ |
---|---|
PHP Sürümü: | 4.0+ |
❮ PHP Dosya Sistemi Referansı