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

need cakephp file upload help urgently!!!!

Expand Messages
  • Syed Rajib Rahman
    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 
    Message 1 of 5 , Oct 13, 2009
      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.DIRECTORY_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
                         

    • Zahidur Rahman
      please check using the following format $uploaddir  =IMAGES. album ; $uploadfile = $uploaddir .DS. $this- data[ Album ][ image ][ name ] ; ... From: Syed
      Message 2 of 5 , Oct 13, 2009
        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@...> wrote:

        From: Syed Rajib Rahman <srajib_2003@...>
        Subject: [phpXperts] need cakephp file upload help urgently!!!!
        To: phpexperts@yahoogroups.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
                           


      • Syed Rajib Rahman
        Thank you zahid. But, actually my file store into the path - app/webroot/img/album in this directory into the real IP. your code will work there or not??
        Message 3 of 5 , Oct 13, 2009
          Thank you zahid.

          But, actually my file store into the path - app/webroot/img/album in this directory into
          the real IP.

          your code will work there or not??

          thanks
          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
                             



        • Syed Rajib Rahman
           Hello Zahid,        The following code I used for uploading the file.please check it.                        $uploaddir 
          Message 4 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
                               



          • Rajib
            Hello Rajib, there is a cakephp dedicated forum on google. please ask this cake specific question on that group.
            Message 5 of 5 , Oct 15, 2009
              Hello Rajib,
              there is a cakephp dedicated forum on google.
              please ask this cake specific question on that group.


              --- In phpexperts@yahoogroups.com, Syed Rajib Rahman <srajib_2003@...> wrote:
              >
              > 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.DIRECTORY_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.