Jump to content

Archived

This topic is now archived and is closed to further replies.

zrohrer

PHP in HTML

Recommended Posts

ok, i had a website that used all PHP with some html and all i had to do to change the text on the front page was change a text file. Now im using HTML and want to do the same thing but the php code isnt working and ive checked many tutorials and they all say the same thing that ive done the code is..

[code]                            <?php
                           
                            echo htmlentities(file_get_contents("home.txt"));
                           
                            ?>[/code]

Thanks

Share this post


Link to post
Share on other sites
What is the name of the file that contains the PHP? if it end in ".html" it won't work. It needs to end in ".php" so the PHP processor is invoked.

Ken

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.