You just need to rewrite following line.
either use full server path or remove starting '/' from the file.
1) Use like this
$filename = $_SERVER['DOCUMENT_ROOT'] . '/skiftrapportPDF/'.$month.'/Skiftrapport'.$datum.'_'.$tid.'-'.$skift.'.pdf';
or write following way,
$filename = 'skiftrapportPDF/'.$month.'/Skiftrapport'.$datum.'_'.$tid.'-'.$skift.'.pdf';
these both will work for you. Just try any of them