#1 (permalink)  
Antigo 16-08-2008, 14:12
Tony Santos Tony Santos está offline
Junior Member
 
Registo: Oct 2007
Msgs: 9
Tony Santos is on a distinguished road
Default

Quem Pode Ajudar-me?


Como e onde eu coloco o caminho do diretório onde os arquivos de upload irão neste script aquém?
<?
/* Defina cá
o tamanho sumo do registo em bytes: */
if($_FILES['registro
']['size'] > 1024000) {
print "<SCRIPT> alert('Seu registro
não poderá ser maior que 1mb'); window.history.go(-1); </SCRIPT>\n";
exit;
}
/* Defina cá
o diretório orientação do upload */
if (!empty($_FILES['registo']['tmp_name']) and is_file($_FILES['registo']['tmp_name'])) {
$caminho="upload/";
$caminho=$caminho.$_FILES['registro
']['name'];

/* Defina cá
o tipo de registo suportado */
if ((eregi(".txt$", $_FILES['registo']['name'])) || (eregi(".jpg$", $_FILES['registro
']['name']))){
copy($_FILES['registo']['tmp_name'],$caminho);
//move_uploaded_file($_FILES['registro
']['tmp_name'], $caminho . $_FILES['userfile']['name']);
print "<h1><center>registo enviado com sucesso!</center></h1>";
}
else{
print "<h1><center>registo não enviado!</center></h1>";
print "<h2><font color='#FF0000'><center>Caminho ou nome de registro
nulo!</center></font></h2>";
}
}
?>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Responder com Quote
Responder

Opções
Display

Regras
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies estão On
Código HTML está Off
Trackbacks are On
Pingbacks are On
Refbacks are On




São agora 21:21.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
© 1995-2009 InforPáscoa, Lda