file is not readable

1,823 views
Skip to first unread message

Arif

unread,
Feb 24, 2011, 12:40:06 AM2/24/11
to php-excel-reader-discuss
recently i use Spreadsheet_Excel_Reader library in codeigniter for
read a xls file. i use a simple .xls file. but it shows the following
error :

The filename http://...../uploads/loop.xls is not readable

mention that the path is correct.
How can i resolve this? can any body help me?

Pratik Goswami

unread,
Feb 25, 2011, 5:28:57 AM2/25/11
to php-excel-re...@googlegroups.com
<?php
date_default_timezone_set('Asia/Calcutta');
if(isset($_POST['btn_save']))
{
error_reporting(E_ALL ^ E_NOTICE);
require_once('excelreader/Excel/reader.php');
mysql_connect("localhost","root","");
mysql_select_db("db_mms");
$edata = new Spreadsheet_Excel_Reader();
$edata->setOutputEncoding('CP1251');


if($_FILES['file']['tmp_name'])
{
echo $edata->read($_FILES['file']['tmp_name']);
}

}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="100%" height="500" border="1" cellpadding="0"
cellspacing="0" align="center">
<tr>
<td height="400" colspan="3" >
<form name="frm" method="post" enctype="multipart/form-data"
id="frm" action="upload_admin.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="350" align="right" valign="top">&nbsp;</td>
<td width="250" align="left" valign="top"><input type="file"
name="file" class="" size="30" value="" /></td>
<td valign="top"> <input name="btn_save" type="submit"
class="Button1Css" id="btn_save" value="Save" ></td>
<td align="left" valign="top">&nbsp;</td>
</tr>
</table>

<!--<form name="frm" method="post" enctype="multipart/form-data"
id="frm" action="upload_bulk.php">
<input type="file" name="file" class="" size="30" value="" />
<input name="btn_save" type="submit" class="Button1Css"
id="btn_save" value="Save" >
--> </form> </td>
</tr>
</table>
</body>
</html>

> --
> You received this message because you are subscribed to the Google Groups
> "php-excel-reader-discuss" group.
> To post to this group, send email to
> php-excel-re...@googlegroups.com.
> To unsubscribe from this group, send email to
> php-excel-reader-d...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/php-excel-reader-discuss?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages