|
Posted by Bob Bedford on 05/23/05 14:27
> Are you aware that filling the array won't automagically upload files?
I know, the files are actually on my server, like they were uploaded.
>
>> my function has the file parameter;
>> myfunction($files)
>>
>> I've seen there is a $file['file1']['tmp_name'] field. But how to save
>> the
>> datas.
>
> $file is not a standard PHP variable. If it's there, it's because your
> script creates it. You can modify it the same way you create it...
>
>
>> In my case, the files are actually on my server (a program upload files
>> on a
>> directory of the server). I must use those files (actually images) to
>> save
>> them somewhere else on the site, after renaming and putting some records
>> in
>> the mysql database.
>
> You can use move_uploaded_file() giving the tmp_name value as parameter.
This is done in my function, and the process is quite long for what I do,
that's why I want it to be done by my function and create the structure.
>
>
>> How to fill such $file structure with the different .jpgs ?
>
> As I told you, that's a custom variable *you* create. When you upload
> files
> what you get is an associative array called $_FILES. It's created
> automatically when the browser uploads files. As I told you, giving it a
> custom value won't upload the file. Check this chapter:
>
> http://es2.php.net/manual/en/features.file-upload.php
I'm looking for such associative array struct called $_FILES ! I repeat the
files are already in a directory of my server, accessible by FTP.
I want to use my function to move the files like they were uploaded by a
FORM.
I can't get this struct.
Bob
[Back to original message]
|