2017-02-03 59 views
0

請幫助。在重置密碼頁面,我得到錯誤的PHP語法錯誤,意外T_ENCAPSED_AND_WHITESPACE,期待T_STRING

syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING 

我的代碼

To reset your password, complete this form: <?php echo URL::to(\'user/reset\', array({$token})); ?>. 

或相同的代碼在laravel如果這能幫助:

To reset your password, complete this form: {{ URL::to(\'user/reset\', array($token)) }}. 
+1

To reset your password, complete this form: {{ URL::to('user/reset', array($token)) }}. 

閱讀PHP手冊? –

回答

2

正確的語法是:

{{ URL::to('user/reset', array($token)) }} 
0

你不應該逃避( \'個字符。你爲什麼要使用'\「',而不是'」'包圍的字符串PHP strings

相關問題