How to handle temporary file on Linux and Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dagam3rz
    New Member
    • Jul 2010
    • 11

    How to handle temporary file on Linux and Windows

    I'm having so much difficulty in manipulating temporary files on Windows and Linux.

    When the code works on Windows it does not work on Linux or vice versa.

    What seems to be the problem?

    TIA...
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    No idea without any code, but possible pitfalls are:
    case sensitive filenames,
    directory structure,
    back/forward slashes

    Comment

    • dagam3rz
      New Member
      • Jul 2010
      • 11

      #3
      @code-green I'm running out of time that's why I failed to include a code snippet to troubleshoot the problem.

      What I did now to resolve the problem is I used tempnam($_SERVE R['DOCUMENT_ROOT']."/", 'tmp');

      This has the same effect on Windows and Linux box.

      Thanks...

      Comment

      Working...