PHP “parse error, expecting `T_STRING' ” - Please help with code

gribliort

New Member
I'm trying to build a dynamic php site using MVC principles. I'm using WAMP on Win XP.Here's the code:Index.php:\[code\]<?php require_once("User.php"); session_start(); include ("Header.php"); include ("Footer.php");?>\[/code\]Header.php:\[code\]<?php echo '<?xml version="1.0" encoding="utf-8"?>'?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"><head> <title><?php echo "temp"; ?></title> <link rel="stylesheet" media="screen" type="text/css" title="StyleSheetProjet" href="http://stackoverflow.com/questions/3645257/StyleSheetProjet.css" /></head><body> <div class="connectionStatus"> <?php ?> </div>\[/code\]Footer.php:\[code\]</body></html>\[/code\]User.php:\[code\]<?php class User { private $userName; private $hashedPassword; private $firstName; private $lastName; private $userEmail; function $getUserName() { return $this->userName; } }?>\[/code\]This code causes a php error on line 9 of User.php, i.e., at the get function declaration. The error message is:\[code\]Parse error: parse error, expecting `T_STRING' in C:\wamp\www\Projet\User.php on line 9\[/code\]Help would be very much appreciated....Thanks,JDelage
 
Back
Top