Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Theme PHP File Include Issue
#30
(2015-09-09, 09:03:12)Tyblitz Wrote: What about doing a scandir on GSTHEMESPATH . $TEMPLATE . '/assets/images/' , then prepend global $SITEURL to each result and output. Voila.

Final solution......


Code:
$folder =  GSDATAUPLOADPATH . 'projects';
$images = array_slice(scandir($folder), 2);
This ended up giving the correct path... and producing results. I guess glob() was not allowed for some reason?
Once I had the file names, I had to create the src url for the <img />


Code:
$path = get_site_url(false) . "data/uploads/projects/";


Then when creating the <img /> I did the following...

Code:
echo "<img class='project' src='" . $path . $i . "' />";


Thank you both for all your help.... It just seems that glob() was not going to work. 
Reply


Messages In This Thread
RE: Custom Theme PHP File Include Issue - by korey.badgley - 2015-09-10, 04:50:55



Users browsing this thread: 3 Guest(s)