API.php advice

For general discussion of the Poker Mavens software
Post Reply
Bonza
Posts: 31
Joined: Fri Feb 17, 2012 2:54 pm
Location: UK
Contact:

API.php advice

Post by Bonza »

Hi here is my problem im getting could be long winded but here we go

On a page im using the ChipLeader.php to include Top ten of the leader board

But im trying to also include the SysStats.php on the same page

Both using the same API.php file

But um getting a error below

Fatal error: Cannot redeclare poker_api() (previously declared in XXXXXXXXX/API.php:6) in XXXXXXXXXXXXXX\API.php on line 6

So my question is can you include 2 or more API.php on one page??

or how do i get around this problem i can post links if needed.

Thanks for reading
Image
New Team Concept poker site
http://www.huskyteampoker.co.uk
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: API.php advice

Post by Kent Briggs »

Bonza wrote: So my question is can you include 2 or more API.php on one page??
Just remove the duplicate includes for API.php in your code so that there is only one. It just contains the Poker_API function which can be called any number of times from different locations in your code.
Bonza
Posts: 31
Joined: Fri Feb 17, 2012 2:54 pm
Location: UK
Contact:

Re: API.php advice

Post by Bonza »

thanks got it sorted

Had to remove both include 'API.php' from both files and add <?php include 'API.php' ?> to the body of the web page, now both are working
Image
New Team Concept poker site
http://www.huskyteampoker.co.uk
Post Reply