Jump to content
Larry Ullman's Book Forums

Recommended Posts

When I open index.php in the browser, the following error appears:


Parse error: syntax error, unexpected 'define' (T_STRING) in C:\wamp\www\exemplo1\html\includes\config.inc.php on line 12


in the config.inc.php is:


12  define ('BASE_URI', 'C:\wamp\www\exemplo1\html\\');
13  define ('BASE_URL', 'localhost/exemplo1/html/');
14  define ('MYSQL', BASE_URI . 'mysql.inc.php');
in the mysqli_inc.php is:
2  DEFINE ('DB_HOST', 'localhost');
3  DEFINE ('DB_USER', 'root');
5  DEFINE ('DB_NAME', 'ecommerce1');
7  $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_Name);
8  mysqli_set_charset($dbc, 'utf8');
10  function escape_data ($data, $dbc) {
12  if (get_magic_quotes_gpc()) $data = stripslashes($data);
13  return mysqli_real_escape_string ($dbc, trim ($data));
14  }
Can someone help me?
Link to post
Share on other sites

the problem was in my directory and in the DEFINE('CONTACT_EMAIL', 'you@example.com');

I'm using localhost so I commented the code: //DEFINE('CONTACT_EMAIL', 'you@example.com'); and it worked.

In windows normal bar also works: 'C:/wamp/www/exemplo1/' or 'C:\wamp\www\exemplo1\\'.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...