functie werkt niet?

Gestart doorOne2xs4 reacties34 weergaven

5 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
ik krijg deze error:
Fatal error: Cannot redeclare forum() (previously declared in /home/fmgroup/public_html/linspin.nl/***/***/config.php:5) in /home/fmgroup/public_html/linspin.nl/***/***/config.php on line 43
als ik dit neer zet:

forum();


dit is de code:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]function[/COLOR] forum[COLOR= #007700]()
{[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"../inc/functies.php"[/COLOR][COLOR= #007700]);[/COLOR]
config[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$config_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `forum_config` LIMIT 1"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$config_sql[/COLOR][COLOR= #007700]))
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Er is een fout opgetreden. Het forum is hierdoor niet toegankelijk! meld een beheerder:<br />Er is iets mis met de tabel forum_config[/COLOR][COLOR= #007700];[/COLOR]
    onder[COLOR= #007700]();[/COLOR]
    [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}[/COLOR]
[COLOR= #0000BB]$config[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$config_sql[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/DEFINE"]DEFINE[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]DIRECT_URL[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000][/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/DEFINE"]DEFINE[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]IMAGE_URL[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]../images/forum/[/COLOR][COLOR= #007700]);[/COLOR]

    [COLOR= #FF8000]/* ======================================================= *
       Author: Luuk van den Ouweland
       Email: luuk_o_1@hotmail.com
       License: GNU-GPL
      
       Information of GNU-GPL license can be found at:
       http://nl.wikipedia.org/wiki/GNU_General_Public_Licence
     * ======================================================= */[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR]is_auth[COLOR= #007700]([/COLOR][COLOR= #0000BB]3[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]))
{[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$config[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]board_open[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<br>Het forum is momenteel gesloten.<br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}
}[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]])) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uHash[/COLOR][COLOR= #007700]])))
    {[/COLOR]
        [COLOR= #0000BB]$userinfo_sql[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `member_accounts` WHERE `uId` = "[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]) .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/trigger_error"]trigger_error[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
        [COLOR= #0000BB]$userinfo[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$userinfo_sql[/COLOR][COLOR= #007700]);
    }[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [COLOR= #0000BB]$userinfo[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uRang[/COLOR][COLOR= #007700]] =[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];
    }[/COLOR]            
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<div>[/COLOR][COLOR= #007700];
}[/COLOR]
?>
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Haal die include eens weg, wat gebeurt er dan?
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Fatal error: Call to undefined function config() in /home/fmgroup/public_html/linspin.nl/forum/config.php on line 4
emodan doet hij het confused
maar als include er boven staat dan doet hij het weer niet dus kan ik niks includen??
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
in welke bestand staat de functie forum?
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
map:
forum
bestand:
config.php

en ik gebruik nu op:
forum/index

kom anders efe op msn?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren