Hi all, here i got a problem where i want to delete file uploaded..my script
just remove from database but not remove from directory.. how can i delete from database and directory at a same time?? Please help me..
HasNor
0
Light Poster
Recommended Answers
Jump to Posttry.. make sure the directory and the file name are properly assigned below.
if (file_exists($attcid."whatever.extensionOfFile"){ @unlink($attcid."whatever.extensionOfFile") ; } else{ echo "Are you kidding me? This file don't even exist. I already looked."; }
Jump to Postunlink works, if it doesn't then there's problem with your path, if you doubt it's functionality, try doing simple test, like unlink(test.php); putting unlink script and test.php into the same directory
All 5 Replies
HasNor
0
Light Poster
veedeoo
474
Junior Poster
Featured Poster
karthik_ppts
commented:
Useful post
+6
HasNor
0
Light Poster
vaultdweller123
32
Posting Pro
HasNor
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.