buenas tardes,
soy nuevo en php, y me encuentro este error:
PHP Parse error: syntax error, unexpected 'uploads' (T_STRING) in rutaroot\desarrollo\subirArchivos\subirJQueryRU\up loadIE.php on line 9
¿a qué se debe?
Código PHP:
Ver original<?php
header('Content-Type: text/html; charset=ISO-8859-15');
$root = "rutaroot";
require_once($root . '/includes/abrirCONPHP.php');
require_once($root . '/includes/closeCONNPHP.php');
$output_dir = "uploads/";
if(isset($_FILES["myfile"])) {
//$codigo = $_POST["codigo"];
$error =$_FILES["myfile"]["error"];
//You need to handle both cases
//If Any browser does not support serializing of multiple files using FormData()
if(!is_array($_FILES["myfile"]["name"])) //single file {
$fileName = $_FILES["myfile"]["name"];
$fileRuta = $output_dir . $fileName;
{
//$fileName = $_FILES["myfile"]["name"] . date("Y") . date("m") . date("d") . date("H") . date("i") .date("j");
$fileName = $_FILES["myfile"]["name"] . "-" . date("YmdHij");
{
$ret[]= $fileName;
//abrirCONPHP();
//$sql = "INSERT INTO tabla () values ()";
//$ins = mysql_query($sql, $conn);
//closeCONNPHP();
}
}
else
{
{
$ret[]= $fileName;
//abrirCONPHP();
//$sql = "INSERT INTO tabla () values ()";
//$ins = mysql_query($sql, $conn);
//closeCONNPHP();
}
}
}
else //Multiple files, file[]
{
$fileCount = count($_FILES["myfile"]["name"]); for($i=0; $i < $fileCount; $i++)
{
$fileName = $_FILES["myfile"]["name"][$i];
{
$ret[]= $fileName;
//abrirCONPHP();
//$sql = "INSERT INTO tabla () values ()";
//$ins = mysql_query($sql, $conn);
//closeCONNPHP();
}
}
}
}
?>