here for a quick overview of the site Help Center Detailed answers syntax error unexpected require_once t_require_once to any questions you might have Meta Discuss the
Syntax Error, Unexpected 'require' (t_require)
workings and policies of this site About Us Learn more about Stack Overflow the company
Unexpected Require() Eslint
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Unexpected Require() Global-require
Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up syntax error, unexpected T_REQUIRE_ONCE [closed] up vote -6 down vote favorite I have just added a newsletter php code on my function.php but parse error: syntax error, unexpected '}' after pasting it I'm getting this problem: Parse error: syntax error, unexpected T_REQUIRE_ONCE in /home/a7888901/public_html/wp-content/themes/eleven40/functions.php on line 1 Here is my function.php code as it is, please help me to fix it. ';} /** Add new image sizes */add_image_size( 'grid-thumbnail', 270, 100, TRUE );/** Create additional color style options */add_theme_support( 'genesis-style-selector', array( 'eleven40-blue' => 'Blue', 'eleven40-green' => 'Green', 'eleven40-red' => 'Red') ); /** Add support for structural wraps */add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer') );/** Add the page title section */add_action( 'genesis_before_content_sidebar_wrap', 'eleven40_page_title' );function eleven40_page_title() { genesis_widget_area( 'page-title', array( 'before' => '
', ) );} /** Add the after post section */a
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 posting ads with us Stack Overflow 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 other. Join them; it only http://stackoverflow.com/questions/19712037/syntax-error-unexpected-t-require-once takes a minute: Sign up php Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION on construct up vote 1 down vote favorite hey guys was hoping you could help me out.. just to let u know in advance, im a relatively new php coder, doing a practice project, and came across this problem and ive spent like an hour of rechecking http://stackoverflow.com/questions/10872097/php-parse-error-syntax-error-unexpected-t-string-expecting-t-function-on-cons and googling but just cant figure out whats causing it error: Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in C:\wamp\www\forum\classes\ClassUser.php on line 7 the segment of the code causing the problem: include $_SERVER["DOCUMENT_ROOT"]."forum/classes/general.inc"; Class User{ __construct($u,$p){ //this is line 7 $user=$u; if(strlen($p)>30|| empty($p) || !preg_match('/[^a-zA-Z0-9]/i',$p)){ $password=0; } else{ $password=hash_hmac('md5',$p,KEY); } } oh and since im new to php, incase im doing something which i should not be, please to recommend.. thanks in advance. note:ive removed the php tags since they seemed to be messing with the formatting of this post :/ note2: im also getting another notice Notice: Use of undefined constant KEY - assumed 'KEY' in C:\wamp\www\forum\classes\general.inc on line 20 but im assuming thats more of a warning than an error... but just adding incase it has something to do with the error general.inc: //error definations define("ERROR_FIELD_EMPTY","Error! All required fields not filled"); define("ERROR_INVALID_SIGNIN","Error! Username/password do not match!"); define("ERROR_GENERAL_INPUT", "Error! Invalid input given"); define("ERROR_SQL_CONNECT","Error! Could not connect to sql database"); //field sizes define("PASSWORD_LENGTH",12); define("USERNAME_LENGTH",30); //sql server details define("SQL_SERVER_NAME","localhost"); define("SQL_SERVER_USERNAME","root"); define("SQL_SERVER_PASSWORD",""); define("SQL_SERVER_DATABASE","forums"); define(KEY,"key"); function __autoload($className){ require_once($_SERVER["DOCUMENT_ROOT"]."forum/classes/Class$className.php"); } ClassUser.php include $_SERVER["DOCUMENT_ROOT"]."forum/classes/general.inc"; C
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/10783733/php-syntax-error-unexpected-t-string and policies of this site About Us Learn more about Stack Overflow http://p2p.wrox.com/beginning-php/36897-parse-error-t_require_once.html the company Business Learn more about hiring developers or posting ads with us Stack Overflow 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 other. Join them; it syntax error only takes a minute: Sign up PHP: syntax error, unexpected T_STRING [closed] up vote 1 down vote favorite I am getting a syntax error for this PHP code syntax error, unexpected T_STRING It says line 2, which is the include line: $row[1]\n  __HTML_END;   }   mysql_free_result( $result );     // Lets build the Image Uploading fields   while($counter <= $number_of_fields) {    $photo_upload_fields .= <<<__HTML_END Â
  Photo {$counter}:   Â
Â
  Caption:   Â
 __HTML_END;    $counter++;   }    // Final Output   echo <<<__HTML_END    Lets upload Photos   Â