Pregunta:
Fecha: 25-06-2018 12:32:15
(En Español)
Votos: 0 - Respuestas: 2 - Vistas: 15 Compartir en: Google Facebook Twitter LinkedIn Link
Ayuda con mensaje: se esperaba ! en la linea 30...[No resuelta]
Alguien podría decir cual es el problema, dice que se esperaba ! en la linea 30, no entiendo<?php
$con = oci_connect("hr", "hr","localhost/XE");
$sql = 'select DEPARTMENT_ID, DEPARTMENT_NAME, MANAGER_ID from departments';
$resultado = oci_parse($con, $sql);
oci_execute($resultado);
$columns_total = oci_num_fields($resultado);
$output = "";
for ($i = 1; $i <= $columns_total; $i++) {
$heading = oci_field_name($resultado, $i);
$output .= '"'.$heading.'",';
}
$output .="\n";
//print $columns_total;
if(oci_num_fields($resultado) > 0)
{
//print $resultado;
$output .='
<table class="table" bordered="1">
<tr>
<th>DEPARTMENT_ID</th>
<th>DEPARTMENT_NAME</th>
<th>MANAGER_ID</th>
</tr>
</table>'
;
$output .="\n";
while(($row=oci_fetch_array($stid,OCI_BOTH))!=false)
{
for ($i = 0; $i < $columns_total; $i++) {
$output .= '"'.$row[$i].'",';
}
$output .="\n";
}
header("content-Type:application/xls");
header("Content-Disposition: attachment; filename=download.xls");
}
?>Votos: 0 - Respuestas: 2 - Vistas: 15 Compartir en: Google Facebook Twitter LinkedIn Link
Respuestas:
-
-
Fecha: 03-07-2018 14:57:43 Creo que aquí está tu problema compañero
heading = oci_field_name($resultado, $i); $output .= '"'.$heading.'",'; }
Votos: 0 - Link respuesta
Para participar activamente de la comunidad primero debes autenticarte, ingresa al sistema.Iniciar Sesión
