Parse Error Unexpected T_variable Expecting
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss syntax error unexpected '$this' (t_variable) expecting function (t_function) the workings and policies of this site About Us Learn more about
Parse Error Syntax Error Unexpected Expecting Function T_function
Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow
Syntax Error, Unexpected (t_variable), Expecting ',' Or ';'
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each
Syntax Error, Unexpected '$data' (t_variable), Expecting Function (t_function)
other. Join them; it only takes a minute: Sign up unexpected T_VARIABLE, expecting T_FUNCTION up vote 11 down vote favorite 3 I am expecting this to be a basic syntax error I overlooked, but I can't figure it out. In a PHP script, I keep getting the following error. Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in expecting variable (t_variable) [path]/scripts/users/database_connection.php on line 4 This occurs when my script to connect to the database is called with an include_once(). I stripped my script down to the most basic code (leaving in what is required by other code), and it still is calling this error. I have struggled with this for a while, and just wondered if anyone else could spot somewhere I went wrong. php sqlite syntax-error share|improve this question asked Jun 26 '11 at 20:50 Ryan Leonard 5241525 add a comment| 4 Answers 4 active oldest votes up vote 14 down vote accepted You can not put $connection = sqlite_open("[path]/data/users.sqlite", 0666); outside the class construction. You have to put that line inside a function or the constructor but you can not place it where you have now. share|improve this answer answered Jun 26 '11 at 20:53 Sabeen Malik 9,19821940 Thank you, first time I tried to
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or expecting t_function posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss parse error, expecting variable (t_variable)"' Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes vendor/laravel/framework/src/illuminate/foundation/helpers.php on line 475 a minute: Sign up Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' [closed] up vote -3 down vote favorite 1 im doing this project for my php class I have included the code. I cannot figure out what http://stackoverflow.com/questions/6486660/unexpected-t-variable-expecting-t-function the syntax error is. I have changed things many times but nothing works. Can someone help me. thanks!