Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How do I get the $_SERVER['HTTP_HOST'] from within a Smarty Plugin?

Anyone know how to get this value from within the plugin. Every time I try the page breaks.
I am trying this:
return $protocol . "://" . $_SERVER['HTTP_HOST']



  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Maybe try using Gardens Request class:

    return Gdn::Request()->Host();

  • Options

    That worked like a charm - Thanks R_J :)

Sign In or Register to comment.