This is my first time using CMSMS and after researching, I found I had to use the User Defined Tags (UDTs) to use custom php. I did that successfully and all my code worked. I wanted to include a php file for mobile detection, but when I do and refresh the page, it's just a completely blank page.
When I view the source, it's entirely empty. I have an if
statement after the include and narrowed it down to the include line being the problem. It's very simple:
include '/Mobile-Detect.php';
$detect = new Mobile_Detect;
// any mobile device (phones or tablets)
if($detect->isMobile()){
if(!$_COOKIE['ppc'] == 'true'){
header('Location: /mobile');
}else{
header('Location: /mobile?ppc=true');
}
}
So I'm not sure why other blocks of code I have in other UDTs works and the include doesn't even throw an error. Hopefully a more experienced CMSMSer can help me out on this.
Thank you