On Thu, April 26, 2007 2:08 pm, Stut wrote:
PHP wrote:
How do I pass an uploaded file, from a form, to a class?
I have a file type on the form called file.
The variable $file is fine in my php code, can be used normally.
But, I want to pass it to a class then manipulate the file, but it
Hi,
How do I pass an uploaded file, from a form, to a class?
I have a file type on the form called file.
The variable $file is fine in my php code, can be used normally.
But, I want to pass it to a class then manipulate the file, but it does not
work.
$cMyClass-fnManipulateFile($file);
the
PHP wrote:
How do I pass an uploaded file, from a form, to a class?
I have a file type on the form called file.
The variable $file is fine in my php code, can be used normally.
But, I want to pass it to a class then manipulate the file, but it does not
work.
On 4/26/07, PHP [EMAIL PROTECTED] wrote:
Hi,
How do I pass an uploaded file, from a form, to a class?
I have a file type on the form called file.
The variable $file is fine in my php code, can be used normally.
But, I want to pass it to a class then manipulate the file, but it does not
work.
2007. 04. 26, csütörtök keltezéssel 11.57-kor PHP ezt írta:
Hi,
How do I pass an uploaded file, from a form, to a class?
I have a file type on the form called file.
The variable $file is fine in my php code, can be used normally.
if you have $file then you are probably using
Hi,
I'm trying to upload a pic file by form (Using QuickForm, but this here also
happens in manually generates Forms).
Everything seems to work fine.
The $_FILES[formfile] shows everything about the file what is needed to
know.
For example: Array ( [formfile] = Array ( [name] = lindworm.jpg
Mirco Blitz wrote:
Hi,
I'm trying to upload a pic file by form (Using QuickForm, but this here also
happens in manually generates Forms).
Everything seems to work fine.
The $_FILES[formfile] shows everything about the file what is needed to
know.
For example: Array ( [formfile] = Array ( [name]
: php-general@lists.php.net
Betreff: Re: [PHP] Uploaded File by Form is mysteriously away.
Mirco Blitz wrote:
Hi,
I'm trying to upload a pic file by form (Using QuickForm, but this here
also
happens in manually generates Forms).
Everything seems to work fine.
The $_FILES[formfile] shows
Hi,
If i have a filename room.jpg in my Upload
Directory, and someone else comes and uploads a file
by the same name, the previous room.jpg is
overwritten by the new one. Any suggestions?
This is the code i'm using :
?php
$db = mysql_connect(localhost,user,pwd);
mysql_select_db(dbname,$db);
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Thomas Edison Jr. declared
Hi,
If i have a filename room.jpg in my Upload
Directory, and someone else comes and uploads a file
by the same name, the previous room.jpg is
overwritten by the new one. Any suggestions?
Well, I
Hmm...
Tried it, and this doesn't sound too good :
Fatal error: Call to undefined function: file_exist()
in d:\apache
group\apache\htdocs\mjimm\mjpals_added.php on line 37
Basically this is what i added in the appropriate
place :
if(file_exist($img1_name)) {
$img1_name =
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Thomas Edison Jr. declared
Hmm...
Tried it, and this doesn't sound too good :
Fatal error: Call to undefined function: file_exist()
in d:\apache
group\apache\htdocs\mjimm\mjpals_added.php on line 37
Sorry, it was a typo:
Glory Power!
I'm using the following code now... the Error is gone,
but it's still overwriting the old file. It's not
changing the name.. not doing anything, just uploading
this new file and replacing the old one..
?php
$db = mysql_connect(localhost,use,pwd);
mysql_select_db(dbname,$db);
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Thomas Edison Jr. declared
Glory Power!
I'm using the following code now... the Error is gone,
but it's still overwriting the old file. It's not
changing the name.. not doing anything, just uploading
this new file and
Glory!
Well, I don't see any thing in your code that
denotes the directory the images are going in?
What about this :
copy($img1, mjpalpics/$img1_name) or Die (Could
not do);
Sends the images to the mjpalpics Directory!
'path/to/img/img.jpg'
exists and if so, name the upload img to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Thomas Edison Jr. declared
Hmm... possibly when i say
if(file_exists($img1_name)), he's looking for the file
name in the Directory where the Images initially go..
but then since i copy them elsewhere, they won't be in
the initial
Well thanks a bunch!
--- Nick Wilson [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Thomas Edison Jr. declared
Hmm... possibly when i say
if(file_exists($img1_name)), he's looking for the
file
name in the Directory where the Images initially
On Saturday 11 May 2002 19:05, Thomas Edison Jr. wrote:
Glory!
Well, I don't see any thing in your code that
denotes the directory the images are going in?
What about this :
copy($img1, mjpalpics/$img1_name) or Die (Could
not do);
Sends the images to the mjpalpics Directory!
copy($img1, mjpalpics/$img1_name) or Die (Could
not do);
Sends the images to the mjpalpics Directory!
Possibly. But one thing that is definitely a problem is:
if(file_exists($img1_name)) {
$img1_name = n+$img1_name;
}
should be:
if(file_exists($img1_name)) {
On Sat, 11 May 2002, Thomas Edison Jr. wrote:
If i have a filename room.jpg in my Upload
Directory, and someone else comes and uploads a file
by the same name, the previous room.jpg is
overwritten by the new one. Any suggestions?
In the long run, I think the best plan is to name your files
WOOO.. i did not know this was possible :
file_exists(mjpalpics/$img1_name)
And this might actually solve the whole issue!! Let me
try this..
Thanks a BUNCH!
T. Edison Jr.
--- John Holmes [EMAIL PROTECTED] wrote:
copy($img1, mjpalpics/$img1_name) or Die
(Could
not do);
Sends the
Hmm..
You gave me a lot to think about, and a whole lot of
work to do. I definately love your idea and logic, and
yes, it would make everyone happy.
well i guess by the time i figure the coding and
process out, i'll keep in mind to arrange for your
British Airways Gift Certificate too.
Glory!
On Sunday 12 May 2002 01:38, Thomas Edison Jr. wrote:
WOOO.. i did not know this was possible :
file_exists(mjpalpics/$img1_name)
And this might actually solve the whole issue!! Let me
try this..
You might find is_file() to be a 'more reliable' indicator because
file_exists() works for
23 matches
Mail list logo