php T_STRING error
Asked Answered
C

1

2

While configuring custom fields in mantis i got this error message , any idea

Parse error: syntax error, unexpected T_STRING in C:\wamp\www\MyProj\custom_strings_inc.php on line 3

The code is

<?php
if( lang_get_current() == 'german' ) {
    $defect_impact = 'Defect Impact'; #// German translation of Defect Impact
    $defect_type =  'Defect Type'; #// German translation of Defect Type
    $phase_of_origin =  ’Phase Of Origin’; #// German translation of Phase Of Origin
}else{
# Default (use your preferred language as the default)
    $defect_impact = 'Defect Impact'; // German translation of Defect Impact
    $defect_type =  'Defect Type'; // German translation of Defect Type
    $phase_of_origin =  'Phase Of Origin'; // German translation of Phase Of Origin
}
?>
Cordeiro answered 14/10, 2011 at 2:48 Comment(2)
Any reason why you use both way to one-line comment ( # and // )?Nola
thank u nettogrof , now using // onlyCordeiro
S
9

Wrong quotes on this line:

$phase_of_origin =  ’Phase Of Origin’;

Should be:

$phase_of_origin =  'Phase Of Origin';
Shipp answered 14/10, 2011 at 2:49 Comment(2)
Still i am unable to correct it eventhough teh error line changed now the error msg is "Parse error: syntax error, unexpected T_STRING in C:\wamp\www\XRINFX\custom_strings_inc.php on line 8" the 6,7,8th lines are 6 => }else{ 7=>$defect_impact = 'Defect Impact'; // English translation of Defect Impact 8=>$defect_type = 'Defect Type'; // English translation of Defect TypeCordeiro
Thank you guys , problem solved and you are right...i renamed the project folder (inside www) now it is up and running , only issus is if i use the original name for the folder , error is displayed again , thanks again .Cordeiro

© 2022 - 2024 — McMap. All rights reserved.