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

Using the URI Class in a Template

Development and Programming

ventismith's avatar
ventismith
4 posts
13 years ago
ventismith's avatar ventismith

I’ve got a project where I’m trying to use the {segment_2} variable as a parameter in a PHP script within a template. From what I can tell, using the URI Class $this->EE->uri->segment(2); is the way to do this. However, when I try to load the page with that code in the template, it resolves to a HTTP 500 error.

There weren’t any docs about whether you can do this or not, so I’m a bit lost as to where I’m going wrong.

EDIT: I’ve tried a couple things and it looks like it’s conflicting with my AWS SDK I’ve got on the page for which there is probably nothing I can do on EE’s end.

       
Coding Pattern's avatar
Coding Pattern
13 posts
13 years ago
Coding Pattern's avatar Coding Pattern

What is EE in your script? Try to omit EE and update me.

       

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.