Related Links : Search Engine Optimization | | Search Engine Marketing | Online Marketing | Freelance Programmer| SEO Thailand | SEO Expert | SEO services | PHP Programmer Thailand | SEO Tutorial | What is SEO |

  Home Our SEO Services SEO Expert Consultant Php Programmer Scripts| Email : sachin {at} jainsachin {dot} com

PHP | Creates a temporary file | Manual | Tutorial | Help

SEO Services



Website Programming in PHP / MYSQL



Friends


    Creates a temporary file

    tmpfile

    (PHP 4, PHP 5)

    tmpfile — Creates a temporary file

    Description

    resource tmpfile ( void )

    Creates a temporary file with a unique name in read-write (w+) mode and returns a file handle .

    The file is automatically removed when closed (using fclose()), or when the script ends.

    For details, consult your system documentation on the tmpfile(3) function, as well as the stdio.h header file.

    Return Values

    Returns a file handle, similar to the one returned by fopen(), for the new file, or FALSE on failure.

    Examples

    Example #1 tmpfile() example

    <?php
    $temp 
    tmpfile();
    fwrite($temp"writing to tempfile");
    fseek($temp0);
    echo 
    fread($temp1024);
    fclose($temp); // this removes the file
    ?>

    The above example will output:

    writing to tempfile
    


    SEO Tutorial / Articles





    Php / Mysql Tutorial



    Articles



      Portfolio


      SEO by Jainsachin