i installed wamp on windows 11. i tested to see if php was installed by using command phpinfo and this worked. when i attempt to use php in html document the php echo statement does not work. i simply get the line of code (shows the echo statement). i have looked at at the php.in file and the httpd.conf file and all appears to be set properly. I dont know where else to look as all help searches point me to those files and the stated configurations look correct.
thanks for any help with this

Recommended Answers

All 2 Replies

I'm putting on my Captain Obvious hat, but could it be that you are using .html instead of .php for your file extension?

test.html
<?php echo 'test.html'; ?>

Will display a blank page. When you view the source code, you will see the echo statement.

test.php
<?php echo 'test.php'; ?>

Will display test.php and the source code will also show test.php

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.