mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-23 13:58:25 +01:00
Fix calcolo link di anteprima pdf
This commit is contained in:
parent
8fb27c4dd3
commit
af58f029c4
@ -250,7 +250,7 @@ class Prints
|
||||
{
|
||||
//http://localhost/openstamanager/
|
||||
$folders = explode('/', dirname($_SERVER['PHP_SELF']));
|
||||
$base = (stripos($_SERVER['SERVER_PROTOCOL'], 'https') === 0 ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/'.$folders[1].'/';
|
||||
$base = (stripos($_SERVER['SERVER_PROTOCOL'], 'https') === 0 ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/'.ROOTDIR.'/';
|
||||
|
||||
return ROOTDIR.'/assets/dist/pdfjs/web/viewer.html?file='.$base.ltrim(str_replace(DOCROOT, '', $path), '/');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user