Link to home
Start Free TrialLog in
Avatar of DS928
DS928Flag for United States of America

asked on

Insert PHP into HTML page.

I need to insert a snippet of PHP into an HTML page.  How can this be achieved?  Thank you.
<div class="welcome-content">
		<div class="row-body">
			<div class="welcome-box-section">News</div>
			 <?php include("/home/audiodigz/public_html/ADDESIGN/blog.php"); ?>  
		</div>
	</div>

Open in new window

Avatar of Kimputer
Kimputer

Your own snippet is already correct. Maybe you mean, it doesn't work because the web server didn't have PHP properly installed? Then the answer is clear: Properly install PHP on the webserver, and your own snippet code will work.
Avatar of DS928

ASKER

I have several PHP pages on this site that work fine.  Am I still missing something?
Oh wait, I now see what you mean. It's not possible. HTML files don't pass through the PHP parser. Have the HTML forward to PHP, where all html code are echo commands and then have your php code inserted.
Change the .html to .php
Avatar of DS928

ASKER

Changed the two pages to square.php and content.php.  Deleted the two previous from the server.  Square.html and content.html.  Now the page is not loading at all.  Sounds like a rabbit hole to me!! LOL!.  The PHP does show in red though in Dreamweaver,
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DS928

ASKER

Thank you Ray.