Page 1 of 1
Having problen in opening csv file for reading ?
Posted: Thu Nov 27, 2008 1:27 am
by bhallash
Code: Select all
<?php
echo $OverrideDuplicates = $_GET["OverrideDuplicates"];
echo $importfile = $_GET["importfile;
echo $useserver = $_GET["useserver"];
echo $serverfile= $_GET["serverfile"];
echo $Headers = $_GET["Headers"];
echo $FieldSeparator =$_GET["FieldSeparator"];
echo $FieldEnclosure = $_GET["FieldEnclosure"];
$f_name = array();
echo "sdfsdfsf";
if (!$handle = fopen($importfile, 'r')) {
echo "Cannot open file ($importfile)";
exit;
}
else
{
echo "Success, wrote ($content) to file ($filename)";
}
Its not opening the file ......
can any one tell me why ?
Re: Having problen in opening csv file for reading ?
Posted: Thu Nov 27, 2008 1:59 am
by requinix
Look at line four.
Re: Having problen in opening csv file for reading ?
Posted: Thu Nov 27, 2008 2:18 am
by bhallash
i have corrected that but still its printing values but not returning handler
Re: Having problen in opening csv file for reading ?
Posted: Thu Nov 27, 2008 2:21 am
by papa
What exactly does your handler path look like and where is the file?
Re: Having problen in opening csv file for reading ?
Posted: Thu Nov 27, 2008 2:26 am
by bhallash
actually i am trying to select a csv file using "input type= file" from my computer which i want to open for reading and then uploading values to the data base. when i will select filename by browsing it will be in my computer only ...... but its not returing $handler as not opening . ....