Categories > TinyButStrong general >

I have variables in include("config.php"); but the tbs class cannot access them.

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: desbest
Date: 2009-11-06
Time: 12:12

I have variables in include("config.php"); but the tbs class cannot access them.

I have variables in include("config.php"); but the tbs class cannot access them.

=======
index.php
=======

<?php
ob_start();
include_once('tbs_class.php');
include ("config.php");
require_once "common.php";
global $pape_policy_uris;

/*             //stop caching and pressing back.
@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@header("Cache-Control: no-cache");
@header("Pragma: no-cache");
     */
$myusername = $logged[username];
$mypoints = $logged[points];

$errormsg = $_GET["error"];

$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('index.html') ;
$TBS->Show() ;
?>


=======
index.html
=======

TinyButStrong Error in field [var.myusername...] : the PHP global variable named 'myusername' does not exist or is not set yet. This message can be cancelled using parameter 'noerr'.

TinyButStrong Error in field [var.mypoints...] : the PHP global variable named 'mypoints' does not exist or is not set yet. This message can be cancelled using parameter 'noerr'.
Hi [var.myusername], you have [var.mypoints] points.                     Logout
By: desbest
Date: 2009-11-06
Time: 12:16

Re: I have variables in include("config.php"); but the tbs class cannot access them.

I have solved the problem.
Please ignore this thread.
Your code does work.