SV: [PHP-WIN] HELP ME PLZ

From: Date: Tue, 03 Jun 2003 08:53:15 +0000
Subject: SV: [PHP-WIN] HELP ME PLZ
Groups: php.windows 
Request: Send a blank email to php-windows+get-20168@lists.php.net to get a copy of this message
Try something like: if ($extensao != '.rep') {... hth Henrik Hornemann > -----Oprindelig meddelelse----- > Fra: Gustavo Andrade [mailto:gu_gao@yahoo.com] > Sendt: 29. maj 2003 00:35 > Til: php-windows@lists.php.net > Emne: [PHP-WIN] HELP ME PLZ > > > 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? > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#20168) next »