Open all files

Forexample you have "F" folder and in it there are files like file1, file2, ...

<a href="#" onclick="open()">Open All</a>
function open() {
<?php
	    
$files = scandir('your-path\F');

foreach($files as $file) {
	if (strpos($file,'file') !== false) {
		echo 'window.open("your-url/'.$file.'")';
	}
}
?>
}

Posted in "Javascript" Views 5027            Published 28/02/2018

All Comments (0)
No Comments