|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi everybody,
Below is a code that delivers (in this case) a picture to user. Let's name it download.php. When I run this program in IE, the file is named as it should be (somepicture.gif) and saves to a disk. But the problem is when I try to save it to my mobile phone via WAP site. An image (or midi) is successfuly received and viewed on my phone screen, but I cannot save it under its original name. It's saved as download.php and afterwards, when I disconnect, my phone does not recognize it as an image. I know that this also depends of the type of mobile phone. Some phones manage to save the image, but looses the file name also. So, the question is: How can I preserve file name when downloading picture to my phone? Is it possible? THE CODE: <?php $filename='somepicture.gif'; $size=5478; $requested_file = '/app/wap/download/'.$filename; if (file_exists($requested_file)) { header('Content-Type: image/gif'); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Disposition: attachment; filename="'.$filename.'"'); header('Content-Length: '.$size); readfile($requested_file); } exit(); ?> THANX! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > How to preserve the file name when downloading pic & midi |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|