Questions tagged [unlink]

Refers to removing a file from a filesystem.

This tag is appropriate for questions about deleting a file from a filesystem whether by using a language-specific function such as Perl or PHP's unlink or by making a system call such as Unix's unlink.

Wikipedia has more information about unlink.

526 questions
-1
votes
1 answer

How to remove image from folder at update phpMysql?

Update query from the database:
-1
votes
1 answer

Unlink file - path issue - Codeigniter

Apparently, I am confused how to use site_url() while deleting a file. My site_url responded with http://localhost/Project/index.php For deleting a file, I use unlink command. However, How to use site_url into the unlink command in codeigniter. I am…
Deepak Keynes
  • 2,291
  • 5
  • 27
  • 56
-1
votes
1 answer

PHP unlink not working when using PHP and Javascript

I have a process for deleting post entries in a PHP app. I want to delete the image associated with the post, if an image exists. The post itself is deleted from the database successfully, but the image is not deleted from the image folder. Here's…
Steve Shead
  • 121
  • 8
-1
votes
1 answer

upload and delete images php sql

Ok, I have built an insert image page (uploader.php) but I have 2 issues. The code is:
JD2011
  • 213
  • 2
  • 12
  • 27
-1
votes
1 answer

when using php file unlink it does not delete the file

this code has worked in the past, nothing has changed that I know of? very basic code: and to access the delete.php…
DML1783
  • 1
  • 1
-1
votes
1 answer

When i delete a row from a database i also want to delete the corresponding file from the folder

The problem is when i delete a document from a table it also needs to delete the file. In this case i am using a folder size key so that clients can see how much space the folder is using. But when i delete the row the files remain which means that…
-1
votes
1 answer

how to unlink all Radio buttons without GroupBox by software

I have a group of radio buttons on the form, which are shaped like a matrix(6x10). I want to draw a pattern or display any number by checking them (i want to use it like dot matrix led). I create radio buttons by software so i can create 60 radio…
-1
votes
1 answer

PHP Warning with unlink even when checking that file exists

I have the following code: if (file_exists($file) && is_file($file)) { unlink($file); } Which gives me this warning: PHP Warning: unlink(/var/www/korea-cosmetics/data/www/korea-cosmetics.ru/system/cache/cache.category.seopath.1547731925): No…
Grin
  • 557
  • 1
  • 6
  • 19
-1
votes
2 answers

Why When i deleted image from database not deleted also from server folder?

The problem is that the deletion is done only from the database and not from the server folder also. Is there an error with my code? This deleteIMG.php
airex
  • 1
  • 2
-1
votes
2 answers

PHP - unlink() works with direct path but not a required one

I am using unlink() to delete a PDF file from a directory. In this case, the name of the file is stored in a variable i.e. $fileName. I have tested to make sure the file name in the variable matches the one in the directory. For some reason it is…
Seb G
  • 661
  • 1
  • 15
  • 34
-1
votes
2 answers

Always get invalid argument when unlink() file from public directory

I use laravel 5.4, I dont really know what exacly causing this error . unlink(C:\xampp5.6\htdocs\sp2hp\public/files/admin/perkara/file_159f459cb9307a.sql ): Invalid argument even I've change with single quote or backslah or any of this asnwer…
Aslam H
  • 1,669
  • 4
  • 21
  • 46
-1
votes
2 answers

Using checkboxes to delete multiple images from db successfully but doesn't unlink files from folder

I have a problem with the unlink() function in PHP. I have used a checkbox for deleting images or uploded video files. Multiple images or videos are deleted sucessfully from the database but not from the local folder using unlink(). There are no…
pranay
  • 49
  • 9
-1
votes
2 answers

Php array_map unlink check if file exists

How do I check if the files exists in my array if I want to delete them with array_map + unlink: // deletes all jpg files in that path array_map('unlink', glob($path."/*.jpg")); Right now if the folder does not contain any .jpg files I get an…
utdev
  • 3,942
  • 8
  • 40
  • 70
-1
votes
2 answers

PHP unlink only works after reload

My deletefile.php has this code. The variable $filename is passed to the script from an href on separate…
Pete D
  • 311
  • 3
  • 15
-1
votes
1 answer

zip file not really getting deleted with 'PHP unlink'

ok, so this is my first post, and it's a bit of a tough nut. i came up empty searching the internet. i'm trying to create a zip file on our server that will vary in size based upon hard-set limits of our friend, paypal. once the first archive is…
Tom Scott
  • 1
  • 1