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"; } ?> Link to comment https://forums.phpfreaks.com/topic/150150-a-php-script-works-in-ie-but-not-in-safari-please-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.