Jump to content

templates, slashes, and eval


robos99

Recommended Posts

I have a template with html and some php variables inside it. This is stored in a database. What I'm trying to do is make it work so that the variables will show up when the template is displayed.

I've tried using eval, but I keep getting parse errors because of the slashes in the template. magic_quotes_runtime is off and magic_quotes_gpc is on. When I don't add any additional escaping to the slashes I get the parse errors I would expect. But when I do addslashes I get
"Warning: Unexpected character in input: '\' (ASCII=92)"

And then I get parse errors from the variables within the html.
"Parse error: parse error, unexpected $ "

I've tried everything and I'm all out of ideas.
Link to comment
https://forums.phpfreaks.com/topic/11918-templates-slashes-and-eval/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.