Results 1 to 3 of 3

Thread: delete file with numerical name?

  1. #1

    Thread Starter
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    delete file with numerical name?

    if i try and delete say 1.php with unlink, gives an error, any way around this ?

  2. #2
    Junior Member
    Join Date
    Mar 2006
    Location
    Newcastle, UK
    Posts
    19

    Re: delete file with numerical name?

    This code worked fine when i tried to delete 1.php...
    PHP Code:
    <?php
    $file 
    "1.php";

    if(
    $_POST['submit']){
    if(
    file_exists($file))
    unlink($file);
    }
    ?>

  3. #3
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: delete file with numerical name?

    What error does it give you when you run your code?

Posting Permissions

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



Click Here to Expand Forum to Full Width