0

my script shows the folloing warning:

"PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in"

the line:

 while ( ($data = fgetcsv($arquivo,0,';') ) !== FALSE ) {

I've got a test environment with PHP Version 5.4.45 the works perfectly, but in production environment with PHP Version 5.6.29-0+deb8u1 it doesn´t work.

  • 2
    `$arquivo` is not a resource handler. The file probably exists in your test environment but not on production so `$arquivo` is never found. – MonkeyZeus May 21 '18 at 17:51
  • And you should have gotten a warning for [`fopen()`](http://php.net/fopen) before that, which might shine some light on it. – mario May 21 '18 at 17:53
  • Possible duplicate of [Reference - What does this error mean in PHP?](https://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php) – aynber May 21 '18 at 17:55

0 Answers0