I don't understand your problem.. may I can help?
I save the picture in a directory and the name of pictures in the
database...
formular view: <div class=input>
        <?php echo 'FileUpload';?>
        <?php echo $form->file('File');?></div>

controller:
 if (is_uploaded_file($this->data['Explorer']['File']['tmp_name'])) {

                                //  Temporaeres file mit eindeutigen
namen erzeugen
                                $strNewFileName = tempnam('/web/htdocs/
cake/explorer/webroot/img/files',
                                                          $this-
>data['Explorer']['surname'] . '_' );
                                // Die endung fuer das bild
                                $extension = substr($this-
>data['Explorer']['File']['name'],
                                                        strrpos($this-
>data['Explorer']['File']['name'], '.'));
                                # 1. in das verzeichnis mit dem temp-
name kopieren
                                copy($this->data['Explorer']['File']
['tmp_name'], $strNewFileName);
                                # 2. ubenennen damit die endung
stimmt:
                                rename($strNewFileName,
$strNewFileName.$extension);

                                # 3. aufraeumen!
                                @unlink($this->data['Explorer']['File']
['tmp_name']);

                                // Jetzt den Namen des Bildes in das
Feld picture der Explorer Tabelle einfügen
                                $this->data['Explorer']['picture'] =
basename($strNewFileName.$extension);
                                //echo $this->data['Explorer']
['picture'] ; exit();



On Mar 16, 5:50 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On 3/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > please help me please :(
>
> More details please
>
> --
> =============================================================
> PHP for E-Biz:http://sanisoft.com
> Cheesecake-Photoblog needs you!:http://cheesecake-photoblog.org
> =============================================================


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to