warning feof() expects parameter 1 to be resource
fopen fails and returns false. false is not a resource, thus the warning.
You'd better test $fp before injecting it as a resource-like argument:
if(($fp = fopen($file, "r"))) {
[...]
}
fopen fails and returns false. false is not a resource, thus the warning.
You'd better test $fp before injecting it as a resource-like argument:
if(($fp = fopen($file, "r"))) {
[...]
}