How to use PHP & Fseek() Read Text File Learn how to use the PHP to Read Text File on web server and using function Fseek()
ShotDev Focus:
- PHP & Read Text File (Fseek())
Example
php_read_text_file.php
<html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <? $strFileName = "shotdev/my.txt"; $objFopen = fopen($strFileName,"r"); $dtData = fread($objFopen,60) ; echo $dtData; ?> </body> </html>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_read_text_file.php
Screenshot