Jump to content

Need help with PHP header("Location


Recommended Posts

I was wondering if it's possible to retain loaded files and the current error setttings after a

header("Location: xxxx.php")

is issued, for example in this:

// Start up the session - not used yet but there just in case

// Enable the Autoloader and initialise it
require_once 'Autoloader.php';

// Check if the application has been installed yet ----------------------------
    header("Location: install/index.php");

And I get a class not found error when I open the install/index.php

// @todo: Disable this in the production version .... I already did this in the main index -- do I have to do this on all pages that may error?
error_reporting(E_ALL & ~E_STRICT);

// Because we jumped here, we have to reinstall the autoloader -- why?
require_once '../Autoloader.php';

While I can understand I wouldn't want this if I was firing off to a completely different site, is there anyway to retain the settings within the same server environment or do I have to reset everything as above.

I even tried using session in the hope that this would 'remember' but it didn't work.





Link to comment
Share on other sites

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.

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.