Answer the question
In order to leave comments, you need to log in
How to make php script execution not get stuck on an error?
The script executes file_get_contents(), and the server to which it accesses is not available. Therefore, an error appears and the script does nothing further.
Answer the question
In order to leave comments, you need to log in
php.net/manual/en/function.file-get-contents.php
The function returns the read data or FALSE on failure.
add a check
$data = file_get_contents($filename);
if ($data) {
// что-то делаем
} else {
die('Нет доступа к файлу '.$filename);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question