16- Filing lecture 2 php

289 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
289
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

16- Filing lecture 2 php

  1. 1. File Handling
  2. 2. File Pointer Functions  fseek() — Seeks on a file pointer  ftell() — Returns the current position of the file read/write pointer.  rewind() — Rewind the position of a file pointer.
  3. 3. Working With Directories  getcwd — Gets the current working directory.  rmdir — Removes directory.  mkdir — Makes directory.  chdir — Change directory.  rename — Renames a file or directory.  unlink — Deletes a file.  readdir — Read entry from directory handle.  opendir — Open directory handle.  pathinfo — Returns information about a file path.
  4. 4. Reading A Directory  <?php  $directory=".";  $res=opendir($directory);  while($file=readdir($res)){  echo $directory."/".$file  }  ?>
  5. 5. Questions ?
  6. 6. Questions ?

×