Page 1 of 1

Using the Unlink Function

Posted: Sat Feb 19, 2005 1:22 pm
by moiseszaragoza
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&#1111;'file'] ;
	$dir=$_GET&#1111;'dir'] ;  	
	unlink($file$dir) ;
	echo "the file : $file has been delete";
?>

Posted: Sat Feb 19, 2005 1:26 pm
by John Cartwright
Are any errors being returned?

try putting this as the top of your page

Code: Select all

error_reporting(E_ALL);

edit--didnt spot that feyd :P

Posted: Sat Feb 19, 2005 1:27 pm
by feyd
$file$dir isn't a file-path.

THanks

Posted: Sat Feb 19, 2005 1:45 pm
by moiseszaragoza
Thanks I got it working