Foros del Web » Programando para Internet » PHP »

Problema de permisos

Estas en el tema de Problema de permisos en el foro de PHP en Foros del Web. Estoy usando este code Código PHP: Código PHP: <?php                       $sql    =  "SELECT * FROM tabla1 " ;                        $sql   .=  " WHERE campo2 = '$id2' " ;                        $sql   .=  " ORDER BY campo3" ;                       $result  =  ...
  #1 (permalink)  
Antiguo 11/08/2006, 10:29
 
Fecha de Ingreso: enero-2003
Mensajes: 516
Antigüedad: 21 años, 3 meses
Puntos: 0
Exclamación Problema de permisos

Estoy usando este code

Código PHP:
Código PHP:
<?php 
                     $sql   
"SELECT * FROM tabla1 "
                     
$sql  .= " WHERE campo2 = '$id2' "
                     
$sql  .= " ORDER BY campo3"
                    
$result mysql_query($sql); 
                     
                           
$shtml .= "<table width='718' cellpadding='1' cellspacing='1'>";   
                     
$shtml .= "<tr>"
                     
$shtml .=     "<td colspan=9 height='80'>"
                    
$shtml .= "Titulo: "// aca pone el titulo 
                     
$shtml .=     "</td>"
                     
$shtml .= "</tr>";  
                           
                     
$shtml .= "<tr>"
                     
$shtml .= "<td width='100'  height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>1</b></div></td>"
                     
$shtml .= "<td width='100'     height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>2</b></td>"
                     
$shtml .= "<td width='100'     height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>3</b></td>"
                     
$shtml .= "<td width='100'  height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>4</b></td>"
                     
$shtml .= "<td width='100'  height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>5</b></td>"
                     
$shtml .= "<td width='100'     height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>6</b></td>"
                     
$shtml .= "<td width='100'     height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>7</b></td>"
                     
$shtml .= "<td width='100'     height='18' style='padding: 2' bgcolor='#C0C0C0' align='left'><font size='2' face='Arial'><b>8</b></td>"
                     
$shtml .= "</tr>"
           
                     while (
$row mysql_fetch_row($result)) {   
                     
$shtml .= "<tr>";  
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[1]    </td>"
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[0]     </td>"
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[2]     </td>"
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[3]     </td>"
                      
                      
                             
                     
$shtml .= "</td>"
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[5]      </td>"
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[6]      </td>"
                     
$shtml .= "<td width='100' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[7]     </td>"
                     
$shtml .= "<td width='250' bgcolor='#E1E1E1' style='padding: 2' height='25' align='left'><font size='2' face='Arial'>$row[8]      </td>"
                        
$shtml .= "</tr>"
                        
$shtml .= "<tr>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "<td  height='1' bgcolor='#cccccc'></td>"
                        
$shtml .= "</tr>";  
                    }        
                    
$shtml .= "</table>"
                    
$scarpeta="excel/";  
                            
//debe tener permisos 775 por lo menos 
                            
$sfile=$scarpeta."".strftime("%H_%M_%S").".xls"//ruta del archivo a generara 
                            
$fp=fopen($sfile,"w"); 
                            
fwrite($fp,$shtml); 
                            
fclose($fp); 
                            echo 
"<script language='javascript'>"
                            echo 
"location.href= '$sfile'"
                            echo 
"</script>";     
                     
                     
                
?>
Sin embargo me sale que no tiens permisos de ejecucion, aunque ya desde el cpanel le di permiso 755, alguien sabe porque pasa esto
gracias
  #2 (permalink)  
Antiguo 11/08/2006, 13:37
Avatar de Nefertiter  
Fecha de Ingreso: enero-2003
Ubicación: Rosario
Mensajes: 1.316
Antigüedad: 21 años, 3 meses
Puntos: 9
proba de darles 777 :)
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:10.