2012-02-08, 06:01 PM
This is the error I'm getting.
I don't get how the error can be on line 1 or how to fix it.
I do have this in my index though, because I'm using .xml files on some places
Parse error: syntax error, unexpected T_STRING in /home/ansem/public_html/fail.php on line 1
This is what I have in the file<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Server Error - Church of Gaming</title>
</head>
<body>
<p><a href="./">Church of Gaming</a> is currently down because of a server-side issue: "<?php echo htmlspecialchars(@$_GET['error'], ENT_COMPAT, 'UTF-8'); ?>".</p>
<p>The javascript web client below connects to our main IRC channel at <a href="#">irc://#/a>.<br/>
You can use it to make us aware of the problem, keep track of the current status, and chat with other players.</p>
<iframe src="#" width="647" height="400"></iframe>
</body>
</html>
I don't get how the error can be on line 1 or how to fix it.
I do have this in my index though, because I'm using .xml files on some places
<?php
// redirect errors to our own logfile
error_reporting(-1); // everything
ini_set("display_errors", "Off");
ini_set("error_log", "logs/churchofgaming-error-".strftime('%Y%m%d').".log");
// enable xhtml+xml mode if the client supports it
if ( stristr(@$_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") )
header("Content-type: application/xhtml+xml");
else
header("Content-type: text/html");
require_once("main.php");
?>