We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

PHP in entries?

Development and Programming

james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

I have a client that needs to be able to put php inside of entries. Can EE allow this?

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
16 years ago
Lisa Wess's avatar Lisa Wess

Why does he need this? I would definitely recommend exploring other avenues.

I believe there are plugins that handle this. Allow PHP from Lodewijk should help out if necessary

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

SHE needs to add one off php to entries. 😉

I agree about being hesitant to allow it. But in this case it should be ok.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

James when you say add PHP to an entry do you just mean she wants to be able to show the code in the entry and display it on site as opposed to actually running the PHP?

If so then there are quite a few different highlighter scripts that can do this on a site. Just wondering if she isn’t actually running the code but just needs to show it for say examples?

Best wishes,

Mark

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

no…to actually run it.

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

Lisa, wrapping the custom field with the allow plugin would assume that the entire post is php… correct?

The PHP in entries would only be an occasional thing. It seems like if I used that plugin for a normal text entry, I would have to put an echo statement into the field?

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
16 years ago
Lisa Wess's avatar Lisa Wess

The entire custom field.

I have no idea on the intricacies of this; want me to move it to the Plugins forum?

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

sure!

       
Euan's avatar
Euan
214 posts
16 years ago
Euan's avatar Euan

James,

Did you get this working?

Euan

       
james Brown's avatar
james Brown
492 posts
16 years ago
james Brown's avatar james Brown

no. :(

       
Euan's avatar
Euan
214 posts
16 years ago
Euan's avatar Euan

I can’t get php to work inside a template either :(

       
Euan's avatar
Euan
214 posts
16 years ago
Euan's avatar Euan

Well I managed to the get php to display ok.

However, when I press submit on the form it re-directs to the site index when in fact the results should appear below the form.

       
Euan's avatar
Euan
214 posts
16 years ago
Euan's avatar Euan
no. :(

After a post and a few replies in the technical support forum I’ve got this working - may want to try over there and explain what you’re trying to achieve 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.