-1

Parse error: syntax error, unexpected ' public' (T_STRING), expecting function (T_FUNCTION) on line 4

<?php
// Redirect Page Function
class Redirect {
    public function __construct($url = null) { \\ this is line 4 
        if ($url)
        {
            echo '<script>location.href="'.$url.'";</script>';
        }
    }
}
?>
DarkFawkes
  • 65
  • 1
  • 1
  • 7

1 Answers1

2

Please remove the comment and your code should work fine.

This is what you should remove:

\ this is line 4

Ravi Gehlot
  • 1,099
  • 11
  • 17