This question already has an answer here:
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>';
}
}
}
?>
</div>