rendered paste body ########### FORMULARIO DA PAGINA (OUTRA) ##############
<div id="upload_file" style="position:absolute; visibility:show; left:9px; top:105px; z-index:0">
<form name="upload_file" action="cria.php" method="post">
<table class="forumline">
<tr>
<td>Arquivo:</td>
</tr>
<tr>
<td><input name="usufile" type="file"></td>
</tr>
<tr>
<td><input type="submit" value="Upload"></td>
</tr>
<tr>
<td><a href="javascript:history.go(-1);">Voltar</a></td>
</tr>
</table>
</form>
</div>
########### UPLOAD ##############
if(isset($_POST['usufile'])){
$filex=$_POST['usufile'];
$dirx=$_SESSION['dir'];
$filexname = $_FILES["usufile"]["name"];
if(file_exists("/" . $dirx . "/" . $filexname)){
print ("arquivo ja existe no servidor...<br>\n");
exit;
}
$store = "/" . $dirx . "/" . $filexname;
if(is_uploaded_file($filexname)){
echo "sim";
} echo "nao";
if(!move_uploaded_file($_FILES["usufile"]["tmp_name"],$store)){
echo "O arquivo não foi carregado";
}
echo "<meta http-equiv=\"refresh\" content=\"0;URL=./?p=pub&ext=php\">";
}