Using PHP in a content block?

Permalink
Hi guys, I've got a PHP script that will display a random quote (listed in an array) each time the page it visited/refreshed.

However, I can't seem to figure out how to implement this code within a content block, as the HTML editor treats it as HTML code, not PHP.

Is there a way to have the code parsed as PHP within a content block so that it functions the way it's supposed to? Any help would be greatly appreciated!

 
chunksmurray replied on at Permalink Reply
chunksmurray
Found this in the Block Requests section:http://www.concrete5.org/community/forums/block_requests/simple_php...

Is this what you are looking for?
Remo replied on at Permalink Reply
Remo
there's even a second solution:
http://www.codeblog.ch/2008/10/concrete5-block-code-ausfuhren/7/...

at the end of the article is a download link.

And if you understand german, it explains how to build the block.

difference between this and the link of chunksmurray: This one allows you only to execute code which has been saved to a php file (you need ftp access), which might make sense because you're able to control the code that can be executed...

If you don't need this, use the other one, you don't have to create files which makes is slightly easier to use