Jump to content

Recommended Posts

Becuase there has been an output to the page before (such as an error) but if *anything* is sent to the browser then the header function wont work

 

for example:

 

echo "hello";
header("Location: somepage.php");

 

that wont work,. however this will:

 

header("Location: somepage.php");

 

the reason is that php has sent out the headers already, and it cannto do it again.

ok, but the problem still exists

 

here's the case

 

i have the following defined function in header.php file

 

 

<?php

# AUTENTICATE
function authenticate($realm = "WBGRS", $errmsg)
{

header("WWW-Authenticate : Basic realm = \"$realm\"");
header("HTTP/1.0 401 Unauthorized");
die ($errmsg);

}

 

and i need to call this function after including this HEADER.PHP page in another one ?? how can that be done ??

 

ABOUT THE OBSTART() function .. it didn't work .. what should the supplied arguments be ?

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.