php T_STRING error

我们两清 提交于 2019-12-12 19:09:50

问题


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
}
?>

回答1:


Wrong quotes on this line:

$phase_of_origin =  ’Phase Of Origin’;

Should be:

$phase_of_origin =  'Phase Of Origin';


来源:https://stackoverflow.com/questions/7762558/php-t-string-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!