Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I keep gettin an error when I use my function (code below), like this:
I am trying to make a function that returns the value of a requested constant. The constant is found in an external file, the file just has a bunch of constants defined in it (it is the options file for my app)Code: Select all
//Used like:
include(get::dir('theme') . '/' . get::opt('TP01') . '/head.php');
class get
{
//Function found later in the script (simplified)
function opt($num)
{
require(get::dir('config') . 'config.php');
$return = constant($num);
global $return;
return $return;
}
}Code: Select all
Warning: constant() [function.constant]: Couldn't find constant TP01 in C:\Documents and Settings\Administrator\My Documents\My Projects\Web Projects\Guava\guav-includes\guav_library.php on line 224Code: Select all
//The theme you would like to use (guav-template/)
DEFINE("TP01", "default");feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]