Results 1 to 2 of 2

Thread: What am I doing wrong?

  1. #1
    Join Date
    Aug 2006

    What am I doing wrong?


    I am in need of some help.

    This is my code:
       $CV= "Cv/".mysql_result($result,$num-1,'CV').".*";
    I need to delete a file on the server. The file can be any type of file (.doc or .pdf ect.) therefore I need to use a wild card. ($file.*)

    I keep getting an error message that the file does not exist. If I add the extention .pdf and it is a pdf file it does delete it, so my dir is correct. The problem seems to be with the wildcard extention.

    What am I doing wrong?

  2. #2
    Join Date
    Nov 2002
    Baltimore, Maryland
    Try something like
    PHP Code:
    foreach (glob ("Cv/".mysql_result($result,$num-1,'CV').".*") as $CV) {
    ulink ($CV);

    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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