Teste se Arquivo pode ser lido no PHP
<?php if (is_readable('https://127.0.0.1/index.html')) { header('Location: https://127.0.0.1/index.html'); }else{ echo "Este arquivo não pode ser lido!"; } ?> <?php // TESTAR SE ARQUIVO PERMITE LEITURA print '<br>'; $filename = 'teste2.php'; if (is_readable($filename)) { echo 'O arquivo permite leitura'; }else{ echo 'O arquivo não permite leitura'; } print '<br>'; ?>
//Outro
<?php
if (is_readable(‘https://127.0.0.1/index.html’)) {
header(‘Location: https://127.0.0.1/index.html’);
}else{
echo “Este arquivo não pode ser lido!”;
}
?>