Fatal error: Function name must be a string in.. PHP error

前端 未结 3 540
旧巷少年郎
旧巷少年郎 2021-01-14 00:15

Hi I have a class called User and a method called insertUser().

function insertUser($first_name, $last_name, $user_name, $password, $email_address, $group_ho         


        
3条回答
  •  再見小時候
    2021-01-14 01:10

    $mysql_query($query); => mysql_query($query);. Note the missing dollar. If you try to use function call syntax on a variable, it looks for a function with the name given by the value of the variable. In this case, you don't have a mysql_query variable, so it comes back with nothing, which isn't a string, and thus gives you the error.

提交回复
热议问题