Home › Forums › Back End › Help CSS in PHP crash when putting / in the end of url. › Reply To: Help CSS in PHP crash when putting / in the end of url.
March 12, 2014 at 9:56 am
#165544
Participant
Do this :
<?php
// The url var is named $url here change it if needed.
// Change the GET var to your needs to.
$url = isset($_GET['url']) ? $_GET['url'] : null;
$url = rtrim($url, '/');
$url = filter_var($url, FILTER_SANITIZE_URL);
$new_url = explode('/', $url);
?>
That should take care of the problem.