Operations on directories

<?phpБезопасные SEO эксперименты

if ($dir = @opendir ( „/ tmp”)) {
while ($file = readdir ($dir)) {
echo „$file \ n”;
}
closedir ($dir);
}

?>

The second way
Example

<?php

$d = dir („/ etc”);
echo „Handle”. $d-> handle. „<br> \ n”;
echo „Path:”. $d-> path. „<br> \ n”;
while ($entry = $d-> read ()) {
echo $entry. „<br> \ n”;
}
$d-> close ();

?>

 

 

 

Cookies help us deliver our services. By using our services, you agree to our use of cookies. More Info | Close