Jump to content

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
session_start(1);

// Enable the Autoloader and initialise it
require_once 'Autoloader.php';
Autoloader::init();

// Check if the application has been installed yet ----------------------------
if(!file_exists('Engine/config.php')){
    session_write_close();
    header("Location: install/index.php");
    die();
}

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


session_start(1);
// @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);
ini_set("display_errors",1);

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

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
https://forums.phpfreaks.com/topic/292961-need-help-with-php-headerlocation/
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.

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.