I've been getting along ok-ish in pset 8 but one thing I have been trying to figure out for a few days and am still not getting correct. The function file_exist() should return false when a file doesn't exist but for one reason or another this if condition does run.
// check if file exists
$file = $argv[1];
if (file_exists($file) == FALSE)
{
exit("[ERROR] ".$file." not found\n");
}
// rest of code
The tree output for my ~/vhosts/pset8 directory is:
./pset8/
|-- bin
| |-- US.txt
| `-- import
The command I run is:
(~/vhosts/pset8/bin): php import pset8/US.txt
Anyone an idea what I'm doing wrong (I have the feeling something extremely simple... but then again, I've been looking at it for a while now)