Loading ...
Sorry, an error occurred while loading the content.
 

Re: [phpXperts] need cakephp file upload help urgently!!!!

Expand Messages
  • Syed Rajib Rahman
     Hello Zahid,        The following code I used for uploading the file.please check it.                        $uploaddir 
    Message 1 of 5 , Oct 13, 2009
       Hello Zahid,
            
      The following code I used for uploading the file.please check it.

                             $uploaddir  =IMAGES."img/album";
                              $uploadfile = $uploaddir .DS. $this->data['Album' ]['image' ]['name'] ;
                           
                              $path_parts = pathinfo($uploadfile);
                              $filetype1     = strtolower($path_parts['extension']);
                      
                              $movefile1    = move_uploaded_file($this->data['Album']['image']['tmp_name'], $uploadfile);
                              $file=$this->data['Album']['image']['name'];
                              $this->data['Album']['image']=$this->data['Album']['image']['name'];
                         
      cheers
      SRR
      --- On Tue, 10/13/09, Zahidur Rahman <zahidcuetcse@...> wrote:

      From: Zahidur Rahman <zahidcuetcse@...>
      Subject: Re: [phpXperts] need cakephp file upload help urgently!!!!
      To: phpexperts@yahoogroups.com
      Date: Tuesday, October 13, 2009, 3:32 AM

       

      please check using the following format

      $uploaddir  =IMAGES."album ";
      $uploadfile = $uploaddir .DS. $this->data['Album' ]['image' ]['name'] ;


      --- On Tue, 10/13/09, Syed Rajib Rahman <srajib_2003@ yahoo.com> wrote:

      From: Syed Rajib Rahman <srajib_2003@ yahoo.com>
      Subject: [phpXperts] need cakephp file upload help urgently!!!!
      To: phpexperts@yahoogro ups.com
      Date: Tuesday, October 13, 2009, 12:53 AM

       

      Dear experts,

      I want to upload image using cakephp.

      I am using real path to upload the file. but its not workiing for real IP.
      $uploaddir  =realpath('. ./webroot/ img/album/ ');
      $uploadfile = $uploaddir.DIRECTOR Y_SEPARATOR. $this->data['Album' ]['image' ]['name'] ;

      It show local address. but i want to upload it into real IP.

      please give me idea.

      Cheers!!!

      rajib
                         



    Your message has been successfully submitted and would be delivered to recipients shortly.