Breaking News

php – image uploading works properly with all devices except iphone


php (codeigniter): image uploading working properly in all devices but on working on iphone devices

Only iphone-captuered images are getting uploaded, but not working for non-captured/other images

My Code Snippet:
(too lengthy code, I am just some part of that code)



          $ppimagedata = $this -> upload -> data();
          $ppnewimagename = $ppimagedata["file_name"];

          $this -> load -> library("image_lib");
          $config['image_library']   = 'gd2';
          $config['source_image']    = $ppimagedata["full_path"];
          $config['create_thumb']    = TRUE;
          $config['maintain_ratio']  = FALSE;

          $config['new_image']    = './uploads/Property/300X300/';
          $config['width']       = 300;
          $config['height']       = 300;
          $this -> image_lib -> initialize($config);
          $this -> image_lib -> resize();

    private function set_upload_options() {     
        $config = array ();
        $config ['upload_path'] = './uploads/Property';
        $config ['allowed_types'] = 'gif|jpg|png';  
        return $config;

above php (codeigniter) script working properly for all devices but not working for iphone

Please suggest me the changes or idea to resolve this issue.

How to&Answers:

In windows or android.. “jpg” auto-consider as “jpeg”. But for iPhone, you have to mention it separately in “allow-types”

About rankhawks

Check Also

php – i want to insert data into database directly from a table (view) but when i click add btn only the first or the last row get insterted

Questions: here in this code i have passed the hardcoded value of month if i …

How can i redirect unstructured link like ( using .htaccess?

Questions: There is a issue of unstructured link like ( How can I redirect its …

php – Enable ZTS on apache CentOS7

Questions: I’m on Centos 7 / apache. I compiled php with ZTS and compiled pthreads. With …

php – JSON: Update base64 string using url JSON

Questions: I’m new to JSON Code. I want to learn about the update function. Currently, …

mysql – Translating sql query to table with php

School Name Summary Expenditure Report For Month SN /td> Sub Total Sub Total

Leave a Reply

Your email address will not be published. Required fields are marked *