Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 11:20 pm EST

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: 08/13/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:
Text Formatted Code

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

 


Exaurdon

 Quote

All times are EST. The time is now 11:20 pm.

  • 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