SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    unlink... No such file or directory

    Warning: unlink(../../BannerIcon/) [function.unlink]: Is a directory in /***/***/***/japansoc/libs/ez_sql_core.php on line 372

    I got the error.

    Can anyone solve this problem.

    Thanks in advance

  2. #2
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Where is the directory?
    "Don't you just love it when you solve a programming bug only to create another."

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got the solution. I used this code.
    Code PHP:
    if($img10!='')   
    			{
    			$img10=$rows['Property_Image10'];
    			$path10 = "../../BannerIcon/".$img10;
    			unlink($path10);
    			}

    Thanks

  4. #4
    derrrp
    Join Date
    Aug 2006
    Location
    earth
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to save yourself from a possible "not found" error, try the file_exists() function with an if conditional to check if the file/directory exists before attempting to unlink it.
    No, I REALLY dislike having to use Joomla.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •