Hi guys, i have a php file to read to content, the following is the code
[PHP]
<?php
include "config.inc.php";
include "connect.inc.php";
if(isset($_GET['id']))
{
$id = $_GET['id'];
$query = "SELECT filename, filetype, filesize, content FROM candidate_table where id = '$id'";
$result = mysql_query($query) or die(mysql_error());
list($filename, $type, $size, $content) = mysql_fetch_array($result);
$file = fopen($filename,"r") or exit("unable to open");
echo "<div style=\"border:1px blue solid; \">";
while(!feof($file))
{
echo fgets($file);
}
fclose($file);
echo "</div>";
/*
header("Content-length:$size");
header("Content-type:$type");
header("Content-Disposition:attachment; $filename=$name");
echo $content;*/
exit;
}
?>
[/PHP]
but, when run the scripts, it showing the following error,
[HTML]
Warning: fopen(drgulrez[02,00][2].doc) [function.fopen]: failed to open stream: No such file or directory in C:\wamp\www\dr_resume_databse\cv.php on line 12
unable to open
[/HTML]
i m not able to fine the solution, if any one can help, plz help me thanks