在编辑器(Eclipse)中执行我的PHP代码时,我收到此错误:
PHP Warning: Module 'json' already loaded in Unknown on line 0.
这里有什么问题,我该如何解决?
我的代码是
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);
>
答案 0 :(得分:0)
这与相关代码无关。它是您的PHP.ini(或其他PHP配置文件),通常位于/ etc / php或/etc/php.ini中。在某个地方,你已经加载了两次JSON模块。
答案 1 :(得分:0)
我在php.ini上做了一些研究,并读到我应该删除该行:
extension=json.so