> Online tutorial : Opening a File in php
Showing posts with label Opening a File in php. Show all posts
Showing posts with label Opening a File in php. Show all posts

Opening a File in php


Opening a File in php

The fopen() function is used to open files in PHP.
Syntax:

fopen('file name','mode of operation')
  • The first parameter of this function contains the name of the file to be opened
  • the second parameter specifies in which mode the file should be opened:

  • <html>
    <body>
    <?php
    $file=fopen("welcome.txt","r");
    ?>
    </body>
    </html>