Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
unlink
- Page 1
Re: Unlink() help
Programming
Web Development
12 Years Ago
by GlenRogers
… $url=mysql_fetch_array($t); $image=$url['filename']; if ($s){
unlink
($image); } else{ echo 'There has been a problem. Go…} But I am getting this error ' Warning:
unlink
(): Invalid argument in C:\wamp\www\diamondback\lee_remove2.php …
Unlink() help
Programming
Web Development
12 Years Ago
by GlenRogers
… thumbs_gallery WHERE id IN ($p)"); if ($sql = $s){ $q;
unlink
($t); //this isnt doing anything at all header( 'Location: lee_remove…
Re: Unlink() help
Programming
Web Development
12 Years Ago
by cereal
…(mysql_num_rows($t) > 0) { # loop results while($row = mysql_fetch_object($t)) {
unlink
('/path/'.$row->filename); # and extension if this is saved…
Re: Unlink() help
Programming
Web Development
12 Years Ago
by AARTI SHRIVAS
pass your file name in a varialbe like $t = mysql_query("SELECT filename from image_gallery WHERE id IN ($p)"); $url=mysql_fetch_array($t); $image=$url['filename']; //what field you use in db type in the url index then do
unlink
($image); this will delete the file from directory....
Re: Unlink() help
Programming
Web Development
12 Years Ago
by AARTI SHRIVAS
… ($p)"); $url=mysql_fetch_array($t); $image=$url['filename']; if ($t){
unlink
($image); $q = mysql_query("DELETE FROM image_gallery WHERE id IN…
Re: Unlink() help
Programming
Web Development
12 Years Ago
by GlenRogers
Thats what was happening, I was deleting the id first then tryin to
unlink
it after! art18, your code worked a treat! Thank you. Thanks everyone that reploied to this. Glen...
unlink() function not working
Programming
Web Development
17 Years Ago
by kevin wood
…could find was about unlinking text file i need to
unlink
an image. i have a variable which store the …i run the code i get the error message Warning:
unlink
(): No such file or directory in /home/acmeart/public_html/…mercury/upload.php i have never used the
unlink
() function before and would like it if someone who has…
Re: unlink() function not working
Programming
Web Development
17 Years Ago
by digital-ether
…'; if (file_exists($fileToRemove)) { // yes the file does exist
unlink
($fileToRemove); } else { // the file is not found, do…of doing this would be: [CODE] if (@
unlink
($fileToRemove)'.jpg' || @
unlink
($fileToRemove).'.png' || @
unlink
($fileToRemove).'.gif') { // unlinked successfully }[/CODE] This…
Re: unlink() function not working
Programming
Web Development
17 Years Ago
by kevin wood
…thumb_image1'; if (file_exists($fileToRemove)) { // yes the file does exist
unlink
($fileToRemove); } else { // the file is not found, do …image1'; if (file_exists($fileToRemove)) { // yes the file does exist
unlink
($fileToRemove); } else { // the file is not found, do …
Re: unlink() function not working
Programming
Web Development
17 Years Ago
by digital-ether
….php.net/umask[/url] [CODE] $result = false; // result of the
unlink
(true|false) $exts = array('jpg', 'png', 'gif', 'jpeg'); foreach($exts… (!is_writable($fileToRemove.'.'.$ext) { umask(0); @chmod($fileToRemove, 077.'.'.$ext); } if (@
unlink
($fileToRemove)) { $result = true; } } }[/CODE] btw: chmod takes the filename as…
Re: unlink() function not working
Programming
Web Development
17 Years Ago
by sDJh
….jpg"). Probably you don't have the permission to
unlink
the file, but then I guess the error would be…
Re: unlink() with Button ?
Programming
Web Development
16 Years Ago
by nav33n
… //install2.php if(isset($_GET['
unlink
']) && $_GET['
unlink
']=="true") {
unlink
("install.php");
unlink
("install2.php"); header… the code here echo "<a href='install2.php?
unlink
=true'>Click here to remove the installation files ! <…
Unlink Problem
Programming
Web Development
15 Years Ago
by safeer007
I have to open and then
unlink
a pdf document. [code=php]$url = "../tempdocs/".$tmpdocname; … i can open this document but as I add [icode]
unlink
($url);[/icode] the browser shows " File is not found…". so
unlink
runs before the completion of file open... if anybody knows…
unlink function
Programming
Web Development
13 Years Ago
by bwls
Questions: Can I use a wildcard in
unlink
- ie: $myfile = '../pdf/'.$tnum .'*.pdf'; This results in an error: Warning:
unlink
(../pdf/36818*.pdf) [function.
unlink
]: No error in \purgepdf.inc.php on line 29 Any help would be greatly appreciated. Thanks, Bill
Re: unlink function
Programming
Web Development
13 Years Ago
by chrishea
See: [URL="http://php.net/manual/en/function.
unlink
.php"]http://php.net/manual/en/function.
unlink
.php[/URL] There are a number of posts about recursive deletes. In answer to your question: it looks as if the
unlink
won't recursively delete with wildcards. You need additional code.
Re: Unlink Problem
Programming
Web Development
15 Years Ago
by Atli
…[/i] the PHP code completes, so any call to [icode]
unlink
($url);[/icode] anywhere in your code would delete the file… the contents of the file readfile($pdfFile); // Delete the file.
unlink
($pdfFile); ?>[/code] You might want to add some error…
Re: unlink not working unless die
Programming
Web Development
10 Years Ago
by Tinnin
…[Click Here](http://bytes.com/topic/php/answers/869596-
unlink
-returns-true-but-does-not-delete) I added the… chmod($emailDir.$attachment, 0777); line before
unlink
($emailDir.$attachment) and now it is working. Doesn't …no permissions warning was produced without the chmod and
unlink
() returned true and the file was deleted eventually but…
Re: Unlink Problem
Programming
Web Development
15 Years Ago
by diafol
Does anything run after the header() to redirect? Is the file being deleted or have you got a problem with your location? Do you redirect successfully if you comment out the
unlink
statement?
unlink function help
Programming
Web Development
14 Years Ago
by tomjrjones
… a file from is "users/" here is the
unlink
script i have so far [CODE] <? $myFile = "users… file"); fclose($fh); $myFile = "users/file.xml";
unlink
($myFile); ?> [/CODE]
Re: unlink function
Programming
Web Development
13 Years Ago
by diafol
How about this? [CODE]$pattern = "*.pdf"; array_map("
unlink
", glob($pattern));[/CODE] That will delete all pdfs from the current directory. You can add locations and other file patterns to the $pattern var - BUT - do not place any whitespace between comma separated values.
Unlink Multiple Files In Different Folders
Programming
Web Development
10 Years Ago
by riwakawd
… should be removed. How am I able to use the
unlink
and realpath for my multiple files? public function delete() { $path_to_file…/template/module' .'/'. $this->uri->segment(5).'.tpl'; if (
unlink
(realpath($path_to_file), realpath($path_to_file_lang)) ) { echo "deleted" .' '. $path_to_file; echo…
unlink not working unless die
Programming
Web Development
10 Years Ago
by Tinnin
Hi All, I'm trying to
unlink
a file. I start with a form and submit it … gets unlinked and the file remains. The code reaches the
unlink
() function either way. Is this a javascript problem or php…
Re: Unlink all files in a directory
Programming
Web Development
14 Years Ago
by paulrajj
Hi, These may help. [URL="http://www.plus2net.com/php_tutorial/php-files-delete.php"]
unlink
files[/URL] [URL="http://php.net/manual/en/function.
unlink
.php"]php.net[/URL]
Re: unlink function help
Programming
Web Development
14 Years Ago
by sudeepjd
… and delete it. [CODE]if (file_exists("users/".$myFile)){
unlink
("users/".$myFile); } else { echo "The file does…
Re: unlink function help
Programming
Web Development
14 Years Ago
by tomjrjones
whats the actual whole script that i need to
unlink
a file that i type into a text field, because your script didnt work
Re: unlink function help
Programming
Web Development
14 Years Ago
by tomjrjones
whats the actual whole script that i need to
unlink
a file that i type into a text field, because your script didnt work
Re: unlink function help
Programming
Web Development
14 Years Ago
by tomjrjones
i keep getting this error[ICODE]
unlink
("users/".$myFile);[/ICODE]is not a directiry
Re: unlink function help
Programming
Web Development
14 Years Ago
by tomjrjones
i keep getting this error[ICODE]
unlink
("users/".$myFile);[/ICODE]is not a directiry
Re: unlink function help
Programming
Web Development
14 Years Ago
by sudeepjd
…]if ($myFile!=""){ if (file_exists("users/".$myFile)){
unlink
("users/".$myFile); } else { echo "The file does…
Re: unlink function help
Programming
Web Development
14 Years Ago
by 84hd0ns
…['file']!=''){ if (file_exists("users/".$_GET['file']."")){
unlink
("users/".$_GET['file'].""); } else {print 'The…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC