0
Hello, I’m having problems with my code. His initial idea is to go through the server and show the links related to the news.
<?php
$inicio=180;
if(file_exists("http://www.sitequalquer.com.br/noticia_".$inicio.".htm")){
while($inicio){
echo '<a href="http://www.sitequalquer.com.br/noticia_'.$inicio.'.htm">noticia'.$inicio.'</a><br>';
$inicio++;
}
}else{
echo "http://www.sitequalquer.com.br/noticia_".$inicio.".htm";
}
?>
I am running this code on my machine; but I have no knowledge if the command file_exists
works to traverse external files.
What are you trying to do? The function
file_exists
does not work for Urls.– André Ribeiro
I didn’t know the function
file_exists
did not work for url’s, would like to know something you can check the link and if it exists– wwwjsw