0

Hi, I have an odd error in my logout.php file maybe you can help me.

I have this in the start of my file:

<?php
   include('../config.php');
   session_destroy();
   session_unset();
?>

In config.php I have session_start();

A little down in the page I have this:

<?php
echo 'Logged out...';
echo '<meta http-equiv="REFRESH" content="0;url=index.php">';
?>

And the error is:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /public_html/short/admin/logout.php on line 1

Can you help me? Thanks!

4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by ko ko
0

what is on line 1? as referred to by the error

Also, you might try using " in your include instead of '?

ex. include("../config.php");

0

In my config.php I have the database connection things and session_start(); and error_reporting(0);

0

when I have gotten this error it is usually because I have an extra character somewhere.

like a ' or " or )

have you had any further developments on this issue?

0

<?php
include('../config.php');
session_destroy();
session_unset();
?>

Remove the indentation white spaces from these lines. Like this

<?php
include('../config.php');
session_destroy();
session_unset();
?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.