Tema: php to excel
Ver Mensaje Individual
  #8 (permalink)  
Antiguo 28/07/2008, 13:56
anion0x
 
Fecha de Ingreso: junio-2008
Mensajes: 110
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: php to excel

tengo la siguiente funcion:

Código:
<?php
function createExcel($filename, $arrydata) {
	$excelfile = "xlsfile://".$filename;  
	$fp = fopen($excelfile, "wb");  
	if (!is_resource($fp)) {  
		die("Error al crear $excelfile");  
	}  
	fwrite($fp, serialize($arrydata));  
	fclose($fp);
	header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");  
	header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");  
	header ("Cache-Control: no-cache, must-revalidate");  
	header ("Pragma: no-cache");  
	header ("Content-type: application/x-msexcel");  
	header ("Content-Disposition: attachment; filename=\"" . $filename . "\"" );
	readfile($excelfile);  
}
?>
lo que necesito hacer es que me cree el *.xls en un direcorio especifico dentro de la web, como lo puedo hacer?
Cuando ejecuto esa funcion me crea el archivo en C:\