Jump to content

Recommended Posts

Posted

hello everybody! I just received the validation of my first domain and i'm pretty new with this... i created an index.html file with this code:

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Welcome to Brontocorp</title>
</head>
<body>
<h1>BRONTOCORP</h1>
<?php  echo "time is ".time() ?>
<?php  echo "hello" ?>
<h2>End of php code</h2>
</body>
</html>

 

but the only thing i get is:

 

Brontocorp

End of php code

 

...

 

so, how can i activate the php code?? help please...

 

thanks in advance ^_^

Posted
so, how can i activate the php code?? help please...

 

thanks in advance ^_^

 

By adding your semi colons:

 

<?php echo "time is ".time(); ?>

<?php echo "hello"; ?>

 

Posted

I think that when the php code is just a line you don't need to add a semi-colon. However, i tried that way and nothing... is PHP active only for some "premium accounts" or something? i created my domain for free.

Posted

i found the problem, really noob btw, i named the file index.html instead of index.php -.-U ... everything is good now thanks for your help. :)

Posted (edited)

Your extension is HTML. It should be either PHP, or PHTML.

 

Edit: Whoops, sorry, didn't see the last post.

Edited by Raninf

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...