Jump to content

a php script works in IE but not in safari .. please help


Anirban1987

Recommended Posts

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";
}
?> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.