make directory, upload file then delete (permission hell)

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

sleepingdanny
New php-forum User
New php-forum User
Posts: 13
Joined: Mon Mar 17, 2003 6:38 am

Postby sleepingdanny » Mon Mar 17, 2003 6:54 am

:arrow: Try this maybe it will work :!: :?:

File's Name: <input type="text" name="file"><br>
Type: <select size="1" name="end">
<option value="gif">.gif</option>
<option value="GIF">.GIF</option>
<option value="jpg">.jpg</option>
<option value="JPG">.JPG</option>
.......................
</select>

Code: Select all

<?
if(isset($file)){
if(file_exists("$file.$end")){
unlink("$file.$end") && print "<b>$file.$end</b> Was Deleted From Your Folder!<br>";
unset($file);}
}
if(isset($file)){
if(!file_exists("$file.$end")){
print "<font color=red><b>ERROR</b>:</font> <b>$file.$end</b> Doesn't Exists In Your Folder!<br>";}
}
?>

Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest