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]
Hi,
Just the other day I've downloaded "form_generator" from SourceForge, but unfortunately I can't get it up & running.
When running "php -al config/config.class.php" I always receive an error which I don't know how to solve:Code: Select all
MH-Dual-G5:~/Sites/develop/form_generator heinm$ php -v
PHP 4.4.1 (cli) (built: Mar 5 2006 10:30:50)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
MH-Dual-G5:~/Sites/develop/form_generator heinm$ php -al ./config/config.class.php
Interactive mode enabled
PHP Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in ./config/config.class.php on line 6
Errors parsing ./config/config.class.php
MH-Dual-G5:~/Sites/develop/form_generator heinm$Code: Select all
<?php
require_once('CDB.class.php');
class config
{
public $db;
public $tables;
public $s;
function __construct()
{
require_once('config.inc.php');
$this->db = CDB::connectDB($dbHost, $dbName, $dbUser, $dbPass, $dbType);
$this->tables = $tables;
$this->configVars = $configVars;
require_once($this->configVars['siteBasePath'].'/config/smarty/libs/Smarty.class.php');
$this->s = new Smarty();
$this->s->template_dir = $this->configVars['siteBasePath']."/templates/";
$this->s->compile_dir = $this->configVars['siteBasePath']."/templates_c/";
}
}
function __autoload($className)
{
require_once("classes/".$className.".class.php");
}
?>Any ideas?
Martin
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]