Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/09/2005, 07:39
Avatar de Salome
Salome
 
Fecha de Ingreso: noviembre-2002
Ubicación: Colombia
Mensajes: 1.032
Antigüedad: 21 años, 5 meses
Puntos: 1
Esto es lo que tenia y me funcionaba en una versión menor de php5.0

Código PHP:
function retornar_query_of_string($query){
        global 
$variables $valores;
        
$query stripcslashes(
                
preg_replace(
                    
$variables ,
                    
$valores ,
                    
$query
                
)
               );        
        if ( 
preg_match("|\?:.*|i"$query)) {
            
$query $this->retornar_query_of_string($query);
        }
        return 
$query
    }    
    
    
    function 
retornar_query($file){
        
$file $_SERVER["DOCUMENT_ROOT"] ."/"$file;
        if (
$debug) echo $file;

         
$gestor=fopen($file,"r");
         
$archivo=fread($gestorfilesize($file));
         
fclose($gestor);
         return 
$this->retornar_query_of_string$archivo );


y pues la función que tengo.. retornar_query($file) para php 5.0 que ando haciendo esto

Código PHP:
function retornar_query($file){
        
$file $_SERVER["DOCUMENT_ROOT"] ."/"$file;
        if (
$debug) echo $file;
        return 
$this->retornar_query_of_stringfile_get_contents$file ) );
    } 
Pero me sale error y no se que cambiar.