I need to delete a file using php function and then redirected the page to another one.
I tried with this code :
-----------------------------------------
delete("$file");
function delete($file){
unlink ($file);
header("Location: npp.php");
}
Works fine in my local host but the following error coming when upload to server : Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/test/np.php:6) in /home/mysite/public_html/test/np.php on line 7
The permission of the directory is 777 and i tried my level best...
Please help me
Thanks in advance