|
|
Joined: Feb 2002
Posts: 91
Journeyman
|
Journeyman
Joined: Feb 2002
Posts: 91 |
I can include news and top posts separately on an index page fine, but if I try to include them both I get an error on the second one.
<p> <? include "/usr/www/users/bogus/t6/addons/ubbtnews.php"; ?> </p> <p> <? include "/usr/www/users/bogus/t6/addons/ubbttopthreads.php"; ?> </p>
The browser then shows:
Fatal error: Cannot redeclare class sql in /usr/www/users/bogus/t6/mysql.inc.php on line 24
ideas?
tia
------------- Youuuuuuuuuuu Rang?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
If your PHP version is 4.0.1pl2 or later, you might try changing the "include" in main.inc.php to "include_once".
|
|
|
|
Joined: Oct 1999
Posts: 282
Enthusiast
|
Enthusiast
Joined: Oct 1999
Posts: 282 |
Try to comment out the include of main.inc.php in your second script. It is already included in the first one:
# require ("$path/main.inc.php");
|
|
|
|
Joined: Feb 2002
Posts: 91
Journeyman
|
Journeyman
Joined: Feb 2002
Posts: 91 |
Worked, thanks
------------- Youuuuuuuuuuu Rang?
|
|
|
|
Joined: Feb 2002
Posts: 91
Journeyman
|
Journeyman
Joined: Feb 2002
Posts: 91 |
I tried Dave_L's first and it worked.
Thanks
------------- Youuuuuuuuuuu Rang?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|