Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP in posts
#1
I've got a theory.

Anything is possible... I think.

Anyway, a post cannot have php embedded in it. I've tried it, and I knew it wouldn't work.
However, I can create a special character markup like, #*#$FUNCTION#*#

I'm curious if PHP or maybe JS could do a simple "find and replace". You could put the code in a component and include the component somewhere above the post.

Better example.

COMPONENT
Code:
<?php
$yeah = echo ("hello world");
?>

XML FILE
Code:
I just want to say #*#$yeah#*#

OUTPUT
Code:
I just want to say hello world
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply




Users browsing this thread: 1 Guest(s)