Try using include_once. You might be accidentally including the same file multiple times.
Have multiple includes in a php file [closed]
-
23-06-2023 - |
Pregunta
I am trying to call 2 functions that i have in 2 separate .php files. Let's say that function1() is in my_functions1.php and function2() is in my_functions2.php.
lets say i have in the same folder a third file called main.php and i want to include the functions from both my_functions1.php and my_functions2.php.
Something like this
<?php
include 'my_functions1.php';
include 'my_functions2.php';
function1();
function2();
?>
For some reason i can't have 2 include files. I am kind of new in PHP and it seems that there is nothing on google about this except of putting all the functions in one file.
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow