I am displaying contents from the text file from database through file_get_contents.
$sql = "SELECT * FROM myContent";
$query = mysqli_query($db, $sql);
$row = mysqli_fetch_row($query);
$file = file_get_contents('mytext.txt');
echo $file;
Everything fine, but when my file is missing I get errors. How I put if-else condition in my php code when file is missed or not in place. Thank you.