Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/10/2007, 18:47
byzard
 
Fecha de Ingreso: agosto-2003
Ubicación: santiago, chile
Mensajes: 303
Antigüedad: 20 años, 8 meses
Puntos: 0
Re: ayuda.. creando carpetas...usando mkdir...

Cita:
Iniciado por Seppo Ver Mensaje
Probá cambiar de directorio chdir y después crearlos...

Código PHP:
//Queremos ver si hay un error
error_reporting(E_ALL);
ini_set('display_errors'1);

//Directorio inicial
echo 'Directorio: ' getcwd() . "\n";
chdir('../$sector/$tienda');

//Directorio donde queremos crear la carpeta
echo 'Nuevo Directorio: ' getcwd() . "\n";

$mypath="MAPA";  // creando carpeta MAPA
mkdir($mypath,0777);
$mypath2="CATALOGO";   // creando carpeta CATALOGO
mkdir($mypath2,0777);
$mypath3="PANORAMA";   // creando carpeta PANORAMA
mkdir($mypath3,0777); 
probe lo de arriba.. me sale este error..

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/flipcl/public_html/test/admin/newlocal_creando.php on line 81

la linea 81: chdir('../$sector/$tienda');

digamos que crea las 3 carpetas en /admin/MAPA , admin/CATALOGO , admin/PANORAMA


pero lo que queria creara en /test/$sector/$tienda/aca las 3 carpetas....

help....