1 Answers
readdir() ফাংশন ডাইরেক্টরির ভিতরে পরবর্তী ইনপুট (ফাইলের নাম) রিটার্ন করে।
উদাহরন:
$dir = "/images/";
// Open a directory, and read its contents
if (is_dir($dir)){
if ($dh = opendir($dir)){
while (($file = readdir($dh)) !== false){
echo "filename:" . $file . "
";
}
closedir($dh);
}
}
?>
ফলাফল:
filename: cat.gif
filename: dog.gif
filename: horse.gif
তথ্যসূত্র: http://www.w3schools.com/php/func_directory_readdir.asp
2698 views
Answered
Related Questions
Next steps
- Find a doctor for in-person or online consultation
- Browse medical tests patients often ask about
- Check medicine information (uses, dosage, brands in Bangladesh)
- More health Q&A on Bissoy