Jump to content

[SOLVED] weird error -- readfile() only reads part of file


P3t3r

Recommended Posts

When I make a file in my forum

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$requester = 'faq';
include($phpbb_root_path . 'common.'.$phpEx);
$mode = _read('mode', TYPE_NO_HTML);
$userdata = session_pagestart($user_ip, PAGE_FAQ);
$user->set($requester, 'faq');
$navigation = new navigation();
$navigation->add('FAQ', '', 'faq', '', '');
$navigation->display();
$page_title = $user->lang($title);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array('body' => 'faq_body.tpl'));
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?>

and then I do a readfile(); on it, I get this output:

set($requester, 'faq');
$navigation = new navigation();
$navigation->add('FAQ', '', 'faq', '', '');
$navigation->display();
$page_title = $user->lang($title);
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array('body' => 'faq_body.tpl'));
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?>

 

The same happens with any other file I try readfile(); on: only the text AFTER the first arrow -> is shown.

Why does this happen? How can I make readfile or file_get_contents get the entire file?

 

Thx!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.