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($gestor, filesize($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_string( file_get_contents( $file ) );
}
Pero me sale error y no se que cambiar.