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
moiseszaragoza
Forum Commoner
Posts: 87 Joined: Sun Oct 03, 2004 4:04 pm
Location: Ft lauderdale
Contact:
Post
by moiseszaragoza » Sat Feb 19, 2005 1:22 pm
I'm trying to use a the unlink Function
I'm passing information actoss the url
http://mysite.com/Deletefile.php?file=t ... filepasth/
Then Im geting the information with the $_GET
But the unlink doso not work.
Code: Select all
<?php
$file=$_GETї'file'] ;
$dir=$_GETї'dir'] ;
unlink($file$dir) ;
echo "the file : $file has been delete";
?>
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sat Feb 19, 2005 1:26 pm
Are any errors being returned?
try putting this as the top of your page
edit--didnt spot that feyd
Last edited by
John Cartwright on Sat Feb 19, 2005 1:28 pm, edited 1 time in total.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Feb 19, 2005 1:27 pm
$file$dir isn't a file-path.
moiseszaragoza
Forum Commoner
Posts: 87 Joined: Sun Oct 03, 2004 4:04 pm
Location: Ft lauderdale
Contact:
Post
by moiseszaragoza » Sat Feb 19, 2005 1:45 pm
Thanks I got it working