Author |
Message |
vignes92
Joined: 08 May 2011 Posts: 1
|
Posted: Sun May 08, 2011 8:10 pm Post subject: Including a php file twice |
|
|
Hello All,
I'm trying to include a php file twice which has a function. I also used function_exists() to prevent redeclaring the function on second include.
This works perfectly on Non encoded version. But after encoding the error was
Fatal error: Cannot redeclare
[!)<9;-!','\!() (previously declared in /home/yyuew/public_html/demo/admin/modules/servers/cpanel.php:0) in <b>/home/yyuew/public_html/demo/admin/modules/servers/cpanel.php</b> on line <b>0
What might be the problem?
Any idea about this?
Thanks. |
|
Back to top |
|
 |
websource
Joined: 09 May 2011 Posts: 1
|
Posted: Mon May 09, 2011 1:11 am Post subject: |
|
|
Instead of using include use include_once. I have the same thing happened yesterday and this solved the problem. |
|
Back to top |
|
 |
liaison ionCube Support
Joined: 16 Dec 2004 Posts: 2788
|
Posted: Wed May 11, 2011 10:51 am Post subject: |
|
|
include_once/require_once exist to avoid coding your own include guards, and should always be the type of include method used unless there is a good reason to use include/require. _________________ Community Admin |
|
Back to top |
|
 |
|