Billy Ma
asked on
How to use PHP to read a file on the server?
How to use PHP to read a file on the server?
$content = file_get_contents('filenam e.txt');
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Why the extra spaces are deleted?
$datafp = fopen("yourfile.txt", "r");
$line = fgets($datafp);
$line = fgets($datafp);