? about page loading

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
andrewdavey
New php-forum User
New php-forum User
Posts: 16
Joined: Wed Feb 12, 2003 5:27 am
Location: Cornwall, England

Check whitespace

Post by andrewdavey » Wed Apr 09, 2003 2:28 am

A common problem I find when adding headers is if there is a whitespace before the starting PHP tag.
For example:

Code: Select all

<?php

header('Location: http://www.php.net/');
?>

This whitespace is counts as an output and is sent to the browser, thus generating the header error message.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests