Why doesn't this html to php back to html code work?

I just tried this code:
http://www.kirupa.com/html5/displaying_php_data_in_html.htm

I & get the nicely formatted text and “?” box fine but no data populates it from servertime.php

The html and php files are in separate subfolders & I provided the full URLs in the code.

In case it matters, it’s being run on a GoDaddy server.

You be better off posting the code that you written wrap around php tags in order for people to clearly help you.

This is the main displayServerTime.htm code (I did fill the URL in “var url = “http://…/servertime.php”;” when I tested it):

[code]

Show FAQ Doc

FAQ via json

?

show time
[/code]

This is the servertime.php:

[php]<?php
$localtime = localtime(time(), true);
echo json_encode($localtime);
?> [/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service