Alejandra
Alejandra

Reputation: 726

PHP date causing XML error

Using PHP Version 5.2.13, I'm trying to use the date() function to get/format date, such function is causing me to get all page in blank and firebug is showing the following error (XML tab):

XML Parsing Error: no element found Location: moz-nullprincipal:{e80b3b2e-b8f1-4a2d-b906-03d42ca6a190} Line Number 1, Column 1:

^

<td class="darkBlueTD">
                <?php echo date("d");?>
            </td>

Upvotes: 0

Views: 132

Answers (2)

user312650
user312650

Reputation:

Are you using any custom error reporting? PHP (since 5.1.0) issues the E_STRICT and E_NOTICE time zone errors.

What I mean is that PHP might issue the "It is not safe to rely on the system's timezone settings." warning and if your error handler is designed to halt on every error, it might be the cause of your sript not outputting any content.

Upvotes: 0

Matti Virkkunen
Matti Virkkunen

Reputation: 65166

That's just Firefox's way of telling you that there was absolutely no content on the page. Your script isn't outputting anything for some reason.

Upvotes: 1

Related Questions