nashbell.com

♿⃔ ♿⃕

הוצאת רשימת כל הקבצים מסוג PDF מתיקייה

<?php
$pdfDirectory = opendir('pdf');
while($pdfName = readdir($pdfDirectory))
	$pdfNames[] = $pdfName;
closedir($pdfDirectory);

$pdfCount = count($pdfNames);
sort($pdfNames);

echo "<h1>$pdfCount קבצים&rlm;</h1>\n<table>";
for($index = 0; $index < $pdfcount; $index++)
	echo "<tr><td>$pdfNames[$index]</td></tr>";
echo '</table>';
?>

הערה: בתוך רשימת הקבצים אשר במערך ‎$pdfNames[]‎ ישנן השמות . ו .. המייצגים את התיקייה הנוכחית ותיקיית האב בהתאמה.

שגיאות PDF

♿⃔ ♿⃕

nashbell.com