开发者

json already loaded error

While executing my PHP cod开发者_高级运维e in editor (Eclipse), I am getting this error:

PHP Warning: Module 'json' already loaded in Unknown on line 0.

What's the problem here, and how do I fix it?

My code is

require_once(realpath(dirname(__FILE__) . "/../resources/config.php"));

require_once(LIBRARY_PATH . "/templateFunctions.php");

/*
    Now you can handle all your php logic outside of the template
    file which makes for very clean code!
*/

$setInIndexDotPhp = "Hey! I was set in the index.php file.";

// Must pass in variables (as an array) to use in template
$variables = array(
    'setInIndexDotPhp' => $setInIndexDotPhp
);

renderLayoutWithContentFile("home.php", $variables);

?>


This has nothing to do with the code in question. It's your PHP.ini (or another PHP configuration file), usually in /etc/php or /etc/php.ini. Somewhere, you've loaded the JSON module twice.


I've done some research in php.ini, and read that I should remove the line:

extension=json.so
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜