Ver Mensaje Individual
  #7 (permalink)  
Antiguo 26/07/2012, 18:43
charlibi27
 
Fecha de Ingreso: julio-2012
Ubicación: Valencia
Mensajes: 13
Antigüedad: 11 años, 9 meses
Puntos: 1
Respuesta: Creación de carpetas dentro servidor

No consigo que funcione, es más he conseguido fastidiar lo que tenía...

Os dejo el codigo que tengo, por si podeis indicarme algo más...

<?php
include_once("conexion.php");//archivo que contiene la conexion
try {
$cn = Conectarse();
$arrayreempla=array("/"," ");
$targetPath = $_SERVER["DOCUMENT_ROOT"] . $_REQUEST["folder"] . "/";
$archivo= str_replace($arrayreempla,"", $_FILES["Filedata"]["name"]);
$tempFile = $_FILES["Filedata"]["tmp_name"];

$files=$_POST['intReferencia'];

$imagen= $_GET['name'].'_'.(($_GET['location'] != '')?$_GET['location'].'_':'').$_FILES['Filedata']['name'];
$targetFile = str_replace("//", "/", $targetPath) . $imagen;
$resultadoi = mysql_query("INSERT INTO tblimagenes (intReferencia,strImagen,ImagenEstado)values('".$_ REQUEST['name']."','".$imagen."',1)",$cn);
if ($resultadoi) {
echo "1";

move_uploaded_file($tempFile, $targetFile);

} else {
echo "0";
}
} catch (Exception $ex) {

echo "0";
}

?>

"""quiero crear dentro del folder subcarpetas con el nombre del valor del $files"""