SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP filesize function not working

    I write a contact form script in PHP where I use the following code.
    PHP Code:
    if(filesize($filename)<10){header("Location: install.php";) 
    These filesize function sometimes giving me undue result and Iím getting redirected to the install page. Now how can I manage this situation keeping PHP safemode ON?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the undue result?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2008
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sometimes the if condition returning false and sometimes true. When i turn off PHP safemode it is running without any problem.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should check what the actual error message is(check the error log, or turn up error_reporting and display_errors).


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
  •