Bekmurod
Fayl yoki Katolok yaratilganmi yo`qmi tekshirish:
Kod · PHP17 qator
<?php

$faylnomi = '/katolok/test.txt';



if (file_exists($faylnomi)) {

    echo "Fayl $faylnomi mavjud";

} else {

    echo "Fayl $faylnomi mavjud emas!";

}

?>

Bu yerda tekshirish uchun ishlatilgan funcsiya file_exists();