Jump to content

[SOLVED] Parse error: syntax error, unexpected T_STRING ....


nathanmaxsonadil

Recommended Posts

ok here's my code from line 1 to 11

1 <?php
2 ob_start(); 
3 session_start(); 
4 $dbuser = 'my_user'; 
5 $dbpass = 'mypass'; 
6 $dbhost = 'localhost'; 
7 $db = 'my_db; 
8 if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
9 {
10 $system_folder = str_replace("", "/", realpath(dirname(__FILE__))).'/classes/';
11 }

P.S: sorry for not replying back soon I was reading something else

Link to comment
Share on other sites

you're missing a closing single quote on the line before it.. honestly, a little bit of syntax highlighting or even two minutes of hard searching could have shown that.

 

EDIT:  you beat me to it.  seriously, spend a little bit of time trying to find the error on your own before defaulting to us to find the parse error.  parse errors should be fairly easy to resolve, since they're usually a symptom of some careless or inattentive programming.

Link to comment
Share on other sites

EDIT:  you beat me to it.  seriously, spend a little bit of time trying to find the error on your own before defaulting to us to find the parse error.  parse errors should be fairly easy to resolve, since they're usually a symptom of some careless or inattentive programming.

 

Syntax highlighting would also point a such error out quite easily.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.