beginner question

Hey guys

So I downloaded tomcat and place my .php file into the root folder. So its a beginner thing so the HTML in this file has a

with this is my website

And a php tag print this is php

When Apache runs the file it displays the HTML

but not the php print

Am I doing anything wrong ?

Lesson 1: If you ask for coding help, it’s advisable to actually show that code instead of saying “I have this code or that code” - Can’t help you much if we can’t see the problem.

[code]

<?php echo "This is an echo
"; print "This is a print"; ?> [/code]

As a test, to ensure PHP is working properly, create a new file within your root directory. Call it whatever you want, but make it a php file.

Copy/paste this line into it:
[php]<?php phpinfo(); ?>[/php]
Save it and then view it in your browser. If PHP is working you should see a ton of details. If not, you should get a blank page.

Sponsor our Newsletter | Privacy Policy | Terms of Service