我创建了这个函数:
的index.php:
<?php
function hello(){
echo "hello word";
}
?>
有效,但在tideSDK中刷新页面会出现此错误:
Fatal error: Cannot redeclare hello() (previously in .......)
我该如何解决这个问题?
答案 0 :(得分:0)
这些功能保存在应用程序的缓存中,
如果刷新页面,应用程序将预先创建的功能。
溶液:
if(!function_exist("hello")){
function hello(){
echo "hello word";
}
}