How do I delete files within a temp folder at only have the .jpg extension.
Here is what I tried;
unlink("../httpdocs/Temp/*.jpg);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to apply the glob function to the pattern, for example:
This is covered in the unlink and glob docs. Unlink itself expects a list of files to process. The glob function will, to quote the docs: