You are here: Re: FILE structure « PHP Programming Language « IT news, forums, messages
Re: FILE structure

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация