este es el codigo para subir el archivo:
Código PHP:
<?php
$categoria = $_POST['categoria'];
$subc = $_POST['subc'];
$marca = $_POST['marca'];
$referencia = $_POST['referencia'];
if (is_uploaded_file($HTTP_POST_FILES['archivo']['tmp_name'])) {
copy($HTTP_POST_FILES['archivo']['tmp_name'], "/imgs");
print "listo";
} else {
echo "Possible file upload attack. Filename: " . $HTTP_POST_FILES['archivo']['name'];
}
?>
Warning: copy(): open_basedir restriction in effect. File(/imgs) is not within the allowed path(s): (/home/unicreat/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/unicreat/public_html/luis/ios/subir.php on line 7
Warning: copy(/imgs): failed to open stream: Operation not permitted in /home/unicreat/public_html/luis/ios/subir.php on line 7
y en la linea 7 tengo lo siguiente:
Código PHP:
copy($HTTP_POST_FILES['archivo']['tmp_name'], "/imgs");