I am trying to extend the functionality of the Auto Scaled product images PHP with a test :
"Is original images newer than thumbnail equivalent"
it is the if (filemtime) line causing the issue .. logic seems right but PHP n00b skills lacking the cut.
I realise the filemtime is not ideal but intend to copy move files to force new creation time rather than use MD5# and create SEO iffy filenames.
Any help greatly welcomed.
"Is original images newer than thumbnail equivalent"
Code:
$sOriginalImageName = str_replace('\\','/', 'ProductImageFileName'); $nScaledWidth = 150; $sThumbImageName = 'Thumbnails/t_' . basename($sOriginalImageName); if (filemtime('$sOriginalImageName')) >= (filemtime('$sThumbImageName')) {
I realise the filemtime is not ideal but intend to copy move files to force new creation time rather than use MD5# and create SEO iffy filenames.
Any help greatly welcomed.
Comment