fatal error :函数名称必须是/home/../public_html/updater.php 第 3 行中的字符串
1: <?php
2:
3: $user_id = $_GET("uid"); /* <-- Line 3 */
4: $user_name = $_GET("uname");
5: $setting = $_GET("setting");
6:
7: $MyString = $user_name + '[' + $user_id + ']{' + $setting + '} \n';
8:
9: $myfile = fopen('database.txt', 'a');
10: fwrite($myfile, $MyString . '\n');
11: fclose($myfile);
12:
13: ?>
有什么问题?
最佳答案
将您的 $_GET()
代码更改为带有方括号的 $_GET[]
。
- $_GET 是一个超全局变量(预定义/内置变量),而不是函数。
- http://php.net/manual/en/language.variables.superglobals.php
关于PHP fatal error : Function name must be a string in,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11706528/