chriscloyd Posted January 8, 2007 Share Posted January 8, 2007 im trying to change the file permissions using chmod so i can unlink a file but how do i go ahead and do thatthis is the error i have with my code[code]<?phpmysql_connect('localhost','www5965_chris','chriscloyd');mysql_select_db('www5965_chris');$id = $_GET['id'];$query = mysql_query("SELECT name, type, size, path FROM upload2 WHERE id = '$id'");while($test = mysql_fetch_array($query)) {$ftp_user_name = 'www5965@christophercloyd.com';$ftp_user_pass = '596511';$ftp_root = '/';$ftp_server = 'localhost';$conn_id = ftp_connect($ftp_server);$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);chmod("upload_test/".$test['name'],0777);unlink("upload_test/".$test['name']);}?>[/code]this is the error im gettingWarning: chmod() [function.chmod]: No such file or directory in /usr/home/www/public_html/delete.php on line 13Warning: unlink(upload_test/steam.exe) [function.unlink]: No such file or directory in /usr/home/www/public_html/delete.php on line 14 Quote Link to comment Share on other sites More sharing options...
trq Posted January 8, 2007 Share Posted January 8, 2007 Does the file exist in that location? PHP says it doesn't. Quote Link to comment Share on other sites More sharing options...
chriscloyd Posted January 8, 2007 Author Share Posted January 8, 2007 ya it does Quote Link to comment Share on other sites More sharing options...
matto Posted January 8, 2007 Share Posted January 8, 2007 You must have the path wrong or the file is unable to be read for some reason......what are the permissions on the file as it sits ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.