function _file2str($file_name)
    {
        // Check state of file and raise an error properly
        if (!file_exists($file_name)) {
            return $this->_raiseError('File not found: ' . $file_name);
        }
        if (!is_file($file_name)) {
            return $this->_raiseError('Not a regular file: ' . $file_name);
        }
        if (!is_readable($file_name)) {
            return $this->_raiseError('File is not readable: ' . $file_name);
        }

        // Temporarily reset magic_quotes_runtime and read file contents
        if ($magic_quote_setting = get_magic_quotes_runtime()) {
            @ini_set('magic_quotes_runtime', 0);
        }
        $cont = file_get_contents($file_name);
        if ($magic_quote_setting) {
            @ini_set('magic_quotes_runtime', $magic_quote_setting);
        }

        return $cont;
    }
function _file2str($file_name)
    {
        // Check state of file and raise an error properly
        if (!file_exists($file_name)) {
            return $this->_raiseError('File not found: ' . $file_name);
        }
        if (!is_file($file_name)) {
            return $this->_raiseError('Not a regular file: ' . $file_name);
        }
        if (!is_readable($file_name)) {
            return $this->_raiseError('File is not readable: ' . $file_name);
        }

        // Temporarily reset magic_quotes_runtime and read file contents
        if ($magic_quote_setting = get_magic_quotes_runtime()) {
            @ini_set('magic_quotes_runtime', 0);
        }
        $cont = file_get_contents($file_name);
        if ($magic_quote_setting) {
            @ini_set('magic_quotes_runtime', $magic_quote_setting);
        }

        return $cont;
    }
function _file2str ( $ file_name ) { // Check state of file and raise an error properly if ( ! file_exists ( $ file_name ) ) { return $ this -> _raiseError ( 'File not found: ' . $ file_name ) ; } if ( ! is_file ( $ file_name ) ) { return $ this -> _raiseError ( 'Not a regular file: ' . $ file_name ) ; } if ( ! is_readable ( $ file_name ) ) { return $ this -> _raiseError ( 'File is not readable: ' . $ file_name ) ; } // Temporarily reset magic_quotes_runtime and read file contents if ( $ magic_quote_setting = get_magic_quotes_runtime ( ) ) { @ ini_set ( 'magic_quotes_runtime' , 0 ) ; } $ cont = file_get_contents ( $ file_name ) ; if ( $ magic_quote_setting ) { @ ini_set ( 'magic_quotes_runtime' , $ magic_quote_setting ) ; } return $ cont ; }
Get the contents of the given file name as string

@param string $file_name Path of file to process

@return string           Contents of $file_name
@access private
Get the contents of the given file name as string