quero um fazer um script do tipo:
ver se existe esse arquivo por exemplo: http://www.wmonline.com.br/teste.jpg, se existir aparece uma msg que existe, caso contrario aparece msg q n existe..!!
como faço?
Verificar Se Existe
Started By gmps, 27/04/2005, 00:17
5 replies to this topic
#1
Posted 27/04/2005, 00:17
"Se você não puder ajudar, atrapalhe; afinal, o importante é participar..."
#2
Posted 27/04/2005, 01:46
configurando a página de erro 404
mas eu tb uso isso em query string
www.seusite.cm.br/?news
$arquivo = $QUERY_STRING;
$ext = ".php";
$erro = "erro.php";
if (file_exists($arquivo.$ext)) {
include_once ($arquivo.$ext);
} else {
includ _once ($erro);
}
ou seja se news.php existir ele exibi o news.php, caso não existir, exibi a erro.php
mas eu tb uso isso em query string
www.seusite.cm.br/?news
$arquivo = $QUERY_STRING;
$ext = ".php";
$erro = "erro.php";
if (file_exists($arquivo.$ext)) {
include_once ($arquivo.$ext);
} else {
includ _once ($erro);
}
ou seja se news.php existir ele exibi o news.php, caso não existir, exibi a erro.php
#3
Posted 27/04/2005, 08:26
if (file_exists($arquivo.$ext)) {
include_once ($arquivo.$ext);
} else {
includ _once ($erro);
}
o include está errado falta o sendo include_once();
Quer ajuda seus amigo e ainda ganhar uma graninha?
Acesse agora mesmo http://yeapiz.com
Acesse agora mesmo http://yeapiz.com
#4
Posted 27/04/2005, 08:47
<? $arquivo = "teste.jpeg"; if(file_exists($arquivo)) { echo" Existe o Arquivo ".$arquivo.""; }else{ echo" Não Existe o Arquivo ".$arquivo.""; } ?>
#5
Posted 27/04/2005, 09:10
foi mal ae , ainda bem que a galera é atentaif (file_exists($arquivo.$ext)) {
include_once ($arquivo.$ext);
} else {
includ _once ($erro);
}
o include está errado falta o sendo include_once();
#6
Posted 27/04/2005, 10:13
nao nao galera, nao é para verifcar arquivo no MEU site, e sim verificacao de outro site, entenderam?
ja encontrei a solucao, valeu
ja encontrei a solucao, valeu
Edição feita por: gmps, 27/04/2005, 11:34.
"Se você não puder ajudar, atrapalhe; afinal, o importante é participar..."
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)