The code below is used to display the various css files with a directory.
if($_POST[‘dir’]){
$dir = $_POST[‘dir’];
}
else {
$dir = getcwd();
//echo $directory;
}
The code below scans the files in tye directory. The files are in an array. Then, the array is sorted with a foreach loop. If the file name is longer than 3 characters and contains ‘.css’, the file list is output.
$files1 = scandir($dir);
foreach($files1 as $file){
if(strlen($file) >=3){
$foil = strstr($file, ‘css’); // As of PHP 5.3.0
//$pos = strpos($file, ‘css’);
if ($foil==true){
echo $file.”<br/>”;
}
}
}
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton