For one of the PHP file, I am using one CSV file (file.csv). When I mention the remote URL, it is not working. But when I upload the file to the same directory, then it s working.
THIS IS WORKING (csv file & php file in same directory)
$handle = fopen("file.csv","r") or die("file dont exist");
// get data
while (!feof($handle )){
// do the stuff
}
Whereas the remote URL in PHP is not working.
$handle = fopen("http://www.mywebsite.com/dir/file.csv","r") or die("file dont exist");
// get data
while (!feof($handle )){
// do the stuff
}
Can any body help me in correcting the remote url code please?