Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Location
    Chennai
    Posts
    11

    Unanswered: php script not working in browser

    Hi,

    I have a php file that has the following piece of code:
    ---
    <?
    $file = "/data/src/Status/a";
    $ret = @chmod($file, 0775);

    $ret = @unlink($file);

    ?>
    ---

    When i run the code from the command line the file ("a") gets deleted. But when i invoke the script using a browser the file is not getting deleted.

    What might be the possible reason?

    Thanks,
    Navanee

  2. #2
    Join Date
    Oct 2003
    Posts
    13
    try not to use unlink ,
    unlink -- Deletes a file
    Description

    http://au.php.net/manual/en/function.unlink.php
    Manish Khanna
    manish@i4u.com.au

  3. #3
    Join Date
    Dec 2003
    Posts
    31
    Originally posted by i4u_dev4
    try not to use unlink ,
    unlink -- Deletes a file
    Description

    http://au.php.net/manual/en/function.unlink.php
    I think that is what he's trying to do.

    Sounds like you may have php permissions problem?

  4. #4
    Join Date
    Jul 2003
    Location
    Jersey
    Posts
    11
    Originally posted by WhSox21
    I think that is what he's trying to do.

    Sounds like you may have php permissions problem?
    I'm thinking what ^ said. you've gotta give the user account that your webserver is using write access to that location.

    ("/data/src/Status/")

Posting Permissions

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