I have a small php system i created for myself. This system contains a few .doc and .docx file documents. I want to be able to open them directly from the browser and not do
My working code to open locally uploaded Files via Firefox (51.0) and the actual Internet Explorer (11).
$pfad = trim(strip_tags(stripslashes(urldecode($_REQUEST['pfad']))));
$datei = trim(strip_tags(stripslashes(urldecode($_REQUEST['file']))));
exec ('start c:\\WINDOWS\\system32\\explorer.exe /select /seperate /n, /e, '.str_replace('/','\\',$pfad).utf8_decode($datei));
saved as open.php
"pfad" is a path BELOW the local Webroot (in my case customer folder) while "file" is - of course - the file which I want to open.
I call it like so: ...href="open.php?pfad=
where both parameters are urlencoded