Warning:move_uploaded_file(I:/FerozoWebHosting/reinos-olvidados.com.ar/public_html/uploads/) [function.move-uploaded-file]: failed to open stream: Permission denied in I:\FerozoWebHosting\reinos-olvidados.com.ar\public_html\uploads\upload_archiv o.php on line 48
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'E:\WINDOWS\TEMP\php9E4C.tmp' to 'I:/FerozoWebHosting/reinos-olvidados.com.ar/public_html/uploads/' in I:\FerozoWebHosting\reinos-olvidados.com.ar\public_html\uploads\upload_archiv o.php on line 48
El codigo de upload_archivo.php es el siguiente:
Código PHP:
<?php
session_start();
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
if(empty($_SESSION["usuario"]))
{
echo '
<td valign="top" align="center">
<table width=565 height=30 border=0 cellpadding=0 cellspacing=0>
<td background="theme/mensajes/menu1.jpg">
<p><b> Ha ocurrido un problema...</b></p>
</td>
</table>
<table width=565 height=160 border=0 cellpadding=0 cellspacing=0>
<td background="theme/mensajes/fondo1.jpg">
<p align="center"><b>Debes loguarte antes de continuar.</b></p>
<p align="center"><a href="index.php">Loguate pulsando aquí.</a></p>
</td>
</table>
</td>';
}
else
{
echo
set_time_limit(0);
include("ftp_config.php");
ftp_pasv($cid, true);
$archivo=$_FILES["archivo"]["name"];
$archivo_tmp=$_FILES["archivo"]["tmp_name"];
$extension=$_FILES["archivo"]["type"];
$size=$_FILES["archivo"]["size"];
//Este es el destino a mover el archivo temporal:
$move="I:/FerozoWebHosting/reinos-olvidados.com.ar/public_html/uploads/";
//Este es el archivo movido:
$newname="I:/FerozoWebHosting/reinos-olvidados.com.ar/public_html/uploads/0";
if (is_uploaded_file($archivo_tmp))
{
if (move_uploaded_file($archivo_tmp, $move))
{
if (rename($newname, $move+$archivo))
{
echo '
<p>Archivo subido con éxito: '.$move.'<br>
<a href="'.$archivo.'">'.$archivo.'</a></p>';
}
}
}
else
{
echo '
<p>El archivo no se pudo subir.<br>
<a href="upload.php"><b>[ Volver ]</b></a></p>';
}
ftp_close($cid);
}
?>
</body>
</html>