Welcome to Geeklog Saturday, May 21 2022 @ 09:30 am EDT

Geeklog Forums

$_CONF variables in staticpages


Tank

Anonymous
Can you pass a $_CONF variable to a static page? If so, how? I want to display an image on a static page and don't want to hard code the actual URL to it.
 Quote

Status: offline

exaurdon

Forum User
Regular Poster
Registered: 13/08/03
Posts: 107
The $_CONF variable is avaliable in staticpages, all you need to do is import the global variable into your php code.

Use somethig like:
PHP Formatted Code

global $_CONF;
echo '<img src="'.$_CONF['site_url'].'/images/foo.png">';

 


Exaurdon

 Quote

All times are EDT. The time is now 09:30 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content