logo


Sconti Black Friday

  •  Operatività del 99,9%
  •  Certificato SSL Gratuito
  •  Supporto Live 24/7
  •  Garanzia di rimborso di 30 giorni
Inizia

Fino al

90

%

OFF

04
GIORNI
05
ORE
12
MINUTI
32
SECONDI
Svendita del Black Friday: Web Hosting
Da 0,80€ /Mese!
Vedi tutte le offerte
×

Conoscenza di base

Trova gli articoli informativi sulle funzionalità, sulle guide per la risoluzione dei problemi,
sulle altre informazioni tecniche relative al servizio hosting di Hostinger.

PHP Fatal error: Cannot redeclare

Modificato il:
PHP Fatal error PHP Fatal erro redeclare php redeclare function redeclare function PHP Fatal error Cannot redeclare

If you see error message 'PHP Fatal error: Cannot redeclare function' or similar error message in your script, it means there is a problem with your script code (it tries to declare the same function multiple times).

This error says that your function is already defined. This could mean:

  • you have the same function defined in two files
  • you have the same function defined in two places in the same file
  •  the file in which your function is defined is included two times (so, it seems the function is defined two times)

To help with the third point, a solution would be to use include_once instead of include when including your functions.php file -- so it cannot be included more than once.