Jump to content

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


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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.