SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: neverhurry on May 04, 2009, 01:44:54 PM

Title: PHP CUSTOM BLOCK PROBLEM
Post by: neverhurry on May 04, 2009, 01:44:54 PM
I AM SORRY if it is not the right place, i didn't find a place for support.

I add a php custom block, the php code is (and i modified the SSI.php file):

"require("/home/veryeuro/public_html/SSI.php");

ssi_recentPostsAttach();"

then when i run it, it get this error:

Fatal error: Cannot redeclare ssi_shutdown() (previously declared in /home/veryeuro/public_html/SSI.php:192) in /home/veryeuro/public_html/SSI.php on line 194

IS IT A BUG?

while i can use the php code with EzPortal, you can check at:

www.chatinchinese.com


THANK YOU VERY MUCH!
Title: Re: PHP CUSTOM BLOCK PROBLEM
Post by: [SiNaN] on May 04, 2009, 01:46:48 PM
Just use this:

Code: [Select]
ssi_recentPostsAttach();
Also, I suggest always using require_once() instead of require().
Title: Re: PHP CUSTOM BLOCK PROBLEM
Post by: neverhurry on May 04, 2009, 02:15:22 PM
Than you, man!
Title: Re: PHP CUSTOM BLOCK PROBLEM
Post by: [SiNaN] on May 04, 2009, 02:16:41 PM
You're welcome.

Marked the topic as solved.
SimplePortal 2.3.8 © 2008-2024, SimplePortal