delete

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
b18c1
Forum Newbie
Posts: 1
Joined: Mon Nov 06, 2006 11:44 am

delete

Post by b18c1 »

delete
Last edited by b18c1 on Mon Nov 06, 2006 4:19 pm, edited 1 time in total.
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

You would want to reverse the condition as a start:

Code: Select all

if ($image == "." || $image == "..")
to

Code: Select all

if ($image != "." && $image != "..")
Inside rename.php you check if image is a valid image name in your directory.
Check out dirname(), realpath() and the other file functions.
Post Reply