Help - Search - Members - Calendar
Full Version: Build a blog - PHP code in entry
Codegrrl.com Forums > Script Help > Tutorial Help
Sunnefa
Okay, I'm trying to use the build a blog tutorial to make myself a sort of content management system, so far it has worked perfectly. There's just one thing... some of the content includes PHP code, and that doesn't display correctly when I go to my single entry page...
Is there a way to somehow embed PHP codes in entries?
Amelie
No, there isn't. Because the blog is written in PHP, it can't also run PHP...
Sunnefa
Okay... thanks... I'll just have to find some other way of dealing with those pages smile.gif There are just two of them, so it shouldn't be very hard smile.gif
Thanks for the answer
Sunnefa
I figured out a workaround for this, I decided to post it here is anyone else will have this problem some day.
In order to make PHP pages work in an entry, you can include them with iframe, so here's what I posted in the entry itself:

CODE
<iframe name="iframename" src="filename.php" width="490" scrolling="no" frameborder="0"></iframe>


That works perfectly smile.gif (obviously the file you have in the "src" part has to be on your server)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.