For pset8, fopen() keeps returning FALSE. The relevant part of my code is below:
#!/usr/bin/env php
<?php
$file = ($argv[1]);
if(file_exists($file) == 0)
{
exit("File does not exist.\n");
}
echo "File exists. \n";
$handle = fopen("$file","r");
if ($handle == FALSE);
{
exit("fopen failed \n");
}
//rest of code
When I run import with
./import /home/ubuntu/workspace/pset8/bin/US.txt
it returns "File exists" and "fopen failed". I've checked all my chmod permissions, directory paths, and the fopen usage manual. It seems like a straightforward step, but is there something obvious that I'm missing? Thanks so much in advance!!