HELP ME PLZ
| From: | Gustavo Andrade | Date: | Wed, 28 May 2003 22:35:20 +0000 |
| Subject: | HELP ME PLZ | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-20165@lists.php.net to get a copy of this message | ||
I HAVE THIS FOLLOWING CODE THAT WORKS PERFECTLY, IT IS A SMALL UPLOAD
SYSTEM.
(IM FROM BRAZIL)
<?
$extensao=substr($arquivo_name, -4);
if (!empty($arquivo) and is_file($arquivo)) {
$caminho="C:\\web\\upload\\";
$caminho=$caminho.$arquivo_name;
copy($arquivo,$caminho);
echo "<h1>O arquivo foi transferido!</h1>";
}else{
echo "<h1>O arquivo não foi transferido!</h1>";
echo "<h2><font color='red'>Nome, caminho ou extensão de arquivo
Inválido</font></h2>";
}
?>
into the $extensao=substr($arquivo_name, -4); i get the value of the upload
file extension.
All that i wish to do is to make an if like this one
if $extensao<>.rep {
echo "<h1>The file is not valid!</h1>";
}else{
echo "<h1>The file is valid!</h1>";
But i cant do that it does not work, can anyone help me?