-1

I am getting the following error while running PHP a script:

Symfony \ Component \ Debug \ Exception \ FatalErrorException
syntax error, unexpected '′' (T_STRING)

. Symfony\Component\Debug\Exception\FatalErrorException …/­app/­filters.php:72

    Route::any(‘check/purchase-code’, function() {if ($code = Input::get(‘code’)) {ini_set(‘user_agent’, ‘Mozilla/5.0′);$result = “”;if ($result = 1) {Session::put(‘valid-usage’,’1′);return Redirect::route(‘install-db-info’);}}return Redirect::to(‘/install’);});
Route::filter(‘user-auth’, function()
Reeno
  • 5,720
  • 11
  • 37
  • 50
Deva YB
  • 21
  • 1
  • 3

3 Answers3

1

Replace all chracters with ' or ".

You probably copied the code from the internet and something got wrong in the copy process

thumbmunkeys
  • 20,606
  • 8
  • 62
  • 110
0

Valid string delimiters in PHP are quote ' and double quote ". Backtick or apostrophe is NOT on the list.

See docs: https://secure.php.net/manual/en/language.types.string.php

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
0

Replace this line (Be Sure about ' and ")

Route::any(‘check/purchase-code’, function() {if ($code = Input::get(‘code’)) {ini_set(‘user_agent’, ‘Mozilla/5.0′);$result = “”;if ($result = 1) {Session::put(‘valid-usage’,’1′);return Redirect::route(‘install-db-info’);}}return Redirect::to(‘/install’);});
Route::filter(‘user-auth’, function()

to this

Route::any('check/purchase-code', function() {if ($code = Input::get('code')) {ini_set('user_agent', 'Mozilla/5.0');$result = "";if ($result = 1) {Session::put('valid-usage','1');return Redirect::route('install-db-info');}}return Redirect::to('/install');});
Route::filter('user-auth', function()
Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85