Jump to content

Anirban1987

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by Anirban1987

  1. This script works well in local wamp server when it is called from flashplayer10 through a FileReference object . Actually when an upload button is clicked the script is called through fr.upload() .... but it does not work in server . though upload progress is seen , no error is thrown . Please help. <?php session_start(); include('SimpleImage.php'); if(isset($_FILES['Filedata']['name'])){ $myimage = new SimpleImage(); $myimage->load($_FILES['Filedata']['tmp_name']); $h=$myimage->getHeight(); $w=$myimage->getWidth(); if($h>=$w){$myimage->resizeToHeight(50); } else{$myimage->resizeToWidth(50); } $myimage->save('alluploads/'.basename($_FILES['Filedata']['name'])); } ?>
  2. I have recently upgraded mysql server from 5.0.75 to 5.1.31 on my Ubuntu server 9.04 32 bit. After that when I am running phpmyadmin it is printing a warning : Your PHP MySQL library version 5.0.75 differs from your MySQL server version 5.1.31. This may cause unpredictable behavior. Plz help !!
  3. 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"; } ?>
×
×
  • 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.