zrohrer Posted October 21, 2006 Share Posted October 21, 2006 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 Link to comment https://forums.phpfreaks.com/topic/24681-php-in-html/ Share on other sites More sharing options...
kenrbnsn Posted October 21, 2006 Share Posted October 21, 2006 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 Link to comment https://forums.phpfreaks.com/topic/24681-php-in-html/#findComment-112412 Share on other sites More sharing options...
zrohrer Posted October 21, 2006 Author Share Posted October 21, 2006 ill try that the file name is index.html Link to comment https://forums.phpfreaks.com/topic/24681-php-in-html/#findComment-112415 Share on other sites More sharing options...
zrohrer Posted October 21, 2006 Author Share Posted October 21, 2006 ok thanks dude, it works now.seriously thanks a ton Link to comment https://forums.phpfreaks.com/topic/24681-php-in-html/#findComment-112417 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.