Issue
In the following statement :
$handle = fopen('./readme.txt');
what variable is $handle ? Is it a boolean or what ?
I am in a doubt after running these 2 different statements :
if($handle) echo "File opened !"
else echo "Error opening the file !";
and
$line = fgets($handle);
So what variable is actually $handle ?
Solution
It returns either a resource or boolean false. Resources are known as a special type and are explained in detail here
Answered By - juco
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.