Working on a script here:
Code: Select all
<?php
// get current directory
getcwd();
// change to directory we want
chdir('wp-content\themes\ldexterldesign\images\logos\accreditors\hoverOff');
// add a backslash onto the end of the URL
$cwd = getcwd();
$cwd = $cwd.'\';
// get all the filenames
$files = scandir($cwd);
// count total files in directory
$totalFiles = count($files);
// spit out the filenames with img tag HTML
for($i = 1; $i <= $totalFiles-1; $i++){
echo '<img src="';
echo $cwd;
echo $files[$i];
echo '"/>';
}
?>Code: Select all
// add a backslash onto the end of the URL
$cwd = getcwd();
$cwd = $cwd.'\';(It won't even show below in my code below, so I must be doing something wrong)
Code: Select all
echo '<img src="';
echo $cwd;
echo '\';
echo $files[$i];
echo '"/>';Thanks,
L