inspire Posted October 9, 2007 Share Posted October 9, 2007 Friend..Need help. ??? i use php 4.0.5 and apache1.3 in windows xp. i store picture files in database mysql.for the viewing purpose, i echo the file content as link.When i click the link.I get a save as message box.I can save the file in my local computer and view file fine but when i click the open button in "save as message box" , i unable open the file successfully. The error message : the path or file name c:\document and settings\test\local settings\Temporary Internet files\content.IE5\k9mzdera\module4[1].ppt is invalid.please check the path and file name correct. In my php.ini i declare the upload_tmp_dir ="C:/apache/php/uploadtemp/" ; page1.php <? echo " ". "<a href=\"slide-view.php?id1=$id1\"> $name</a>"; ?> --> if i click the link, the download message box appear and when i click open i get error as above. slide-view.php <?php session_start(); mysql_connect("localhost", "root", "root") or die("no connection"); mysql_select_db("gddatab") or die("no database"); if(isset($HTTP_GET_VARS['id1'])) { $id = $HTTP_GET_VARS['id1']; $query = "SELECT cs_name, cs_type, cs_size, cs_content FROM ots_slide WHERE cs_id = '$id'"; $result = mysql_query($query) or die('Error, query failed'); list($name, $type, $size, $content) = mysql_fetch_array($result); header("Content-length: $size"); header("Content-type: $type"); header("Content-Disposition: attachment; filename=$name"); echo $content; exit; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/72392-unable-to-locate-file-into-temp-directory/ Share on other sites More sharing options...
SammyGunnz Posted October 9, 2007 Share Posted October 9, 2007 Somewhat off topic...If this is a local machine that you're administrating....excuse me for asking but, why on g-d's green earth would you be using PHP 4.0? Quote Link to comment https://forums.phpfreaks.com/topic/72392-unable-to-locate-file-into-temp-directory/#findComment-365107 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.