Anirban1987 Posted March 19, 2009 Share Posted March 19, 2009 The following php works in internet explorer but not in safari or chrome . In IE all files are saved in specified folder . But in safari , xml portion works .. that is myxml.xml is saved in 'uploads/'.$temp directory ... but uploaded files are not saved in the given folder ..instead they are saved in 'uploads' folder .... not in 'uploads/'.$temp folder or 'uploads/'.$temp.'/image/' folder ... The script is called from flash ... I am new to php ... please help ... <?php session_start(); $temp=$_SESSION['myfolder']; $raw_xml=file_get_contents("php://input"); if(isset($_FILES['Filedata']['name'])){ $whichfile=$_FILES['Filedata']['name']; $whichextension=substr($whichfile,-3); if($whichextension=='flv'||$whichextension=='pdf'||$whichextension=='txt'||$whichextension=='mp3'){ move_uploaded_file($_FILES['Filedata']['tmp_name'],'uploads/'.$temp.'/'.basename($whichfile)); } elseif($whichextension=='jpg'||$whichextension=='png'||$whichextension=='gif'){ move_uploaded_file($_FILES['Filedata']['tmp_name'],'uploads/'.$temp.'/image/'.basename($whichfile)); } } elseif($raw_xml!=false){ $fp=fopen('uploads/'.$temp.'/myxml.xml','w'); fwrite($fp,$raw_xml); fclose($fp); } else{ echo "&fname=$temp"; } ?> Quote Link to comment 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.