Linked Questions
12 questions linked to/from How to delete a file via PHP?
0 votes
0 answers
102 views
Delete PDF made in laravel-dompdf [duplicate]
I have created a PDF in Laravel 5 by Laravel-dompdf. $pdf = PDF::loadHTML($html) ->setPaper('a4', 'landscape') ->setWarnings(false) ->save('documents/f_'.$...
-3 votes
1 answer
67 views
PHP: Deleting the "body" of the file even there's a similar file name [duplicate]
I am creating a PHP Program where it will delete the file inside a folder and i am using unlink() but after reading about unlink() it seems like it will not delete the "body" of the file if there is a ...
47 votes
7 answers
5k views
completely deleting a file from server
I want to delete a file by using PHP. I have used the unlink() function, but I was wondering about the security of unlink. Is the file completely deleted from the server? I want to make sure that ...
1 vote
2 answers
3k views
How to delete file in PHP
I want to delete files in a specific directory in PHP. How can I achieve this? I have the following code but it does not delete the files. $files = array(); $dir = dir('files'); while ($file = $dir-&...
0 votes
1 answer
2k views
Fatal error: Uncaught exception 'Exception' with message 'Could not open input file'
I have a class name aes.php (found when googling). This class use Rijndael-128. here the aes.php <?php /* Version: 1.0 */ class aes_encryption{ const CIPHER = ...
0 votes
1 answer
480 views
how to get first element in $_POST
I have a bunch of files that I show on the page from folder, and every file has a button to delete it from the folder, I'm using hidden input to get the file name and to link it with path to delete it....
1 vote
3 answers
103 views
update values in table php-mysql
I have this table: +----+------------+-----------------------+ | ID | ID_PRODUCT | LINK_DOWNLOAD | +----+------------+-----------------------+ | 1 | 2369 | folder/2015.03.12.pdf | | 2 ...
0 votes
0 answers
200 views
PHP Unlink Delete Incorrect File Name
I want to make a function to delete a file in my folder through php. I've written the code based on suggestion from here, but eventually it is not deleting the file I intended to remove. It's removing ...
3 votes
2 answers
76 views
Iterate PHP Array of files and delete any files that have no content
I have an array of files with full directory path to each file. I need to iterate my files array and then delete ay of the files that are 0byte/non content inside them. files.txt /lib/Zend/Gdata/...
-1 votes
1 answer
140 views
Add /clear command to html form
I have some code for a type of note making thing: <h1>Notes About the rebellion:</h1> <form action="index.php" method='post'> Subject:<br><textarea name='textblock'></...
1 vote
1 answer
73 views
How to delete a file via PHP - receiving error
Trying to delete files from server but receive this error: unlink(): cURL does not allow unlinking in... Here is my code: foreach($fDel as $del=>$delval){ $paths = array("art/images/", "art/...
0 votes
0 answers
40 views
How do I write a delete function into this code to delete both directory and files in it?
So I have look through and directory exclude certain files, show files numbered with a delete button and need to write in a delete function to delete the directory and the files in it and not sure how ...