Jurik Posted October 20, 2006 Share Posted October 20, 2006 Hi guys I have two peices of code one adds a file to a folder, the other deletes the file in the fodler. Both are using the same path, the add code works, however the delete code code not below is the coede I use on both pages.[code]$target_path = "\\\benin\\videolibrary\\";$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);[/code][code]{ extract($row); chdir ("\\\benin\\videolibrary\\"); unlink($Videofile);}[/code]As you can see both are using the same path, the belete code however brings up the following error[quote]Warning: chdir(): No such file or directory (errno 2) in c:\documents and settings\administrator\my documents\web pages\st john fisher movie front end v2\delete.php on line 28Warning: unlink(Seeifthisfileuploads.php): No such file or directory in c:\documents and settings\administrator\my documents\web pages\st john fisher movie front end v2\delete.php on line 29[/quote]Now im guessing the second error is because the first error occurs, does anyone know what is causing this problem and how to fix it, I can work out how its not working when the adding code works fine and there both using the same path Link to comment https://forums.phpfreaks.com/topic/24523-adding-and-deleting-same-path-only-one-working/ Share on other sites More sharing options...
JasonLewis Posted October 20, 2006 Share Posted October 20, 2006 so the file and everything is uploaded? Link to comment https://forums.phpfreaks.com/topic/24523-adding-and-deleting-same-path-only-one-working/#findComment-111771 Share on other sites More sharing options...
Jurik Posted October 20, 2006 Author Share Posted October 20, 2006 [quote author=ProjectFear link=topic=112099.msg454882#msg454882 date=1161341587]so the file and everything is uploaded?[/quote]Yep it appears in the database and everything, its just the second peice of code with the unlick command that dont seem to work Link to comment https://forums.phpfreaks.com/topic/24523-adding-and-deleting-same-path-only-one-working/#findComment-111778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.