Reply to Re: Force image renaming to start at 1 and increment

Re: Force image renaming to start at 1 and increment new!
by Jason, 17 years, 8 months ago
OK... a bit of thinking and i've fixed the problem!

I defined a variable:
$count=1

then modified the handle:
$handle->file_new_name_body = 'image_'.$count++;

and made sure the following two handles were set:
$handle->file_overwrite = true;
$handle->file_auto_rename = false;

Hopefully this will help someone out there trying to do the same.

Thanks again for a fantastic class!Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important