FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Header phase problem





Mgccl
I found where the problem is...
It's strange... when I include these 2 function, the problem shows
Warning: Cannot modify header information - headers already sent by (output started at F:\xampp\htdocs\patcher\functions2.php:1) in F:\xampp\htdocs\patcher\functions2.php on line 176

Code:
       function hexToAscii($hex){
    $strLength = strlen($hex);
    $returnVal = '';

    for($i=0; $i<$strLength; $i += 2)
    {
      $dec_val = hexdec(substr($hex, $i, 2));
        $returnVal .= chr($dec_val);
    }
    return $returnVal;
}

function func_replace($data, $replace) {
   $i = 0;
   while($replace[$i]) {
      if ($replace[$i]['on']) {
         $new = $replace[$i]['new'];
         $offset = hexdec($replace[$i]['offset']) + 0.5;
         $data = substr_replace($data, $new, $offset, strlen($new));
      }
      $i++;
   }
   return $data;
}
Traveller
The "cannot modify header" error usually means that you have some whitespace before the opening "<?" tag or after the closing "?>" tag of PHP code used before the body of your page (esp. in code for working with cookies). You can't see it, but it's there. Thus, the browser sees the space, starts generating output, then gets to an operation that is supposed to take place before any output and gives you the error message.
Mgccl
I tried and see... NO WHITE SPACE.... it's strange...
Oblivion-Zion
can u post the whole code from opening to closing php tags please.
DanielXP
Change your opening tag to <?php
Related topics
CANT UPLOAD .htaccess, .htpasswd, .header, .footer
GD-library header probs
phpbb problem....
Header("Location: PROBLEM");
How do i set up a secure socket layer SSL?
an annoying problem - PLEASE help
islam is...
CSS div alignment issue, IE and FF (newbie problem)
phpBB plus 1.53 beta8 problem!!
phpBB header problem.
Header redirect problem
Having Trouble With Drop Down Menus
header already sent? (and now introducing a mysql problem)
XML/XHTML header problem
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.