Are you really using temp_name when you want tmp_name?
On Wed, March 5, 2008 4:37 am, Pieter du Toit wrote:
> Just to add, if i try to echo the $_FILES['txtPhoto']['temp_name'] it
> tells
> me that temp_name is also an array, but when i echo
> $_FILES['txtPhoto']['name'] it gives me the correct na
> >
> > What variable are you passing as the parameter?
> >
> >
> >
> > -Original Message-
> > From: Pieter du Toit [mailto:[EMAIL PROTECTED]
> > Sent: 05 March 2008 13:36
> > To: php-general@lists.php.net
> > Subject: [PHP]
Pieter du Toit wrote:
Just to add, if i try to echo the $_FILES['txtPhoto']['temp_name'] it tells
The above reference is wrong. 'temp_name' should be 'tmp_name'
me that temp_name is also an array, but when i echo
$_FILES['txtPhoto']['name'] it gives me the correct name. Also with a
vardump
;" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
What is on line 49?
What variable are you passing as the parameter?
-Original Message-
From: Pieter du Toit [mailto:[EMAIL PROTECTED]
Sent: 05 March 2008 13:36
To: php-general@lists.php.net
Subject: [PHP] Re:
Thanks Colin this will help me, like i said im just trying to help its not
my code and i dont work with photos like this, but i Do appreciate your
patience with me.
"Colin Guthrie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Pieter du Toit wrote:
>> That is the problem, i can s
Pieter du Toit wrote:
> That is the problem, i can see the name of the file with $txtPhoto['name']
> but when i use the same with temp_name, i get nothing, one weird thing is
> this [error] => 0 [size] => 17008 , what is that?
>
> this is the code that is giving the problem
> $txtPhotoData = ad
That is the problem, i can see the name of the file with $txtPhoto['name']
but when i use the same with temp_name, i get nothing, one weird thing is
this [error] => 0 [size] => 17008 , what is that?
this is the code that is giving the problem
$txtPhotoData = addslashes(fread(fopen($txtPhoto, "r
Pieter du Toit wrote:
> This is my problem
>
> Warning: fopen() expects parameter 1 to be string, array given in
> /usr/www/users/zululr/marketplace/myzululand/specials_proc.php on line 49
Dude, just as a general observation, when you are asking for help, don't
just describe what you do, post th
Pieter du Toit wrote:
> I ran a print_r on it and this is the results
>
> Array ( [txtPhoto] => Array ( [name] => g1.jpg [type] => image/pjpeg
> [tmp_name] => /tmp/php3qkA4A [error] => 0 [size] => 17008 ) )
>
> The image received here must be inserted into a database as binary it looks
> like i
]
Sent: 05 March 2008 13:43
To: php-general@lists.php.net
Subject: Re: [PHP] Re: Variable post as array
This is line 49
$txtPhotoData = addslashes(fread(fopen($txtPhoto, "r"),
filesize($txtPhoto)));
the $txtPhoto is the parameter
""Angelo Zanetti"" <[EMAIL P
hat variable are you passing as the parameter?
>
>
>
> -Original Message-
> From: Pieter du Toit [mailto:[EMAIL PROTECTED]
> Sent: 05 March 2008 13:36
> To: php-general@lists.php.net
> Subject: [PHP] Re: Variable post as array
>
> This is my problem
>
> Warning:
What is on line 49?
What variable are you passing as the parameter?
-Original Message-
From: Pieter du Toit [mailto:[EMAIL PROTECTED]
Sent: 05 March 2008 13:36
To: php-general@lists.php.net
Subject: [PHP] Re: Variable post as array
This is my problem
Warning: fopen() expects
FILES); to see all the values in the variable?
>
> Its difficult to see whats going on as you posted your whole file.
>
>
>
> -Original Message-
> From: Pieter du Toit [mailto:[EMAIL PROTECTED]
> Sent: 05 March 2008 12:38
> To: php-general@lists.php.net
> Subj
This is my problem
Warning: fopen() expects parameter 1 to be string, array given in
/usr/www/users/zululr/marketplace/myzululand/specials_proc.php on line 49
"Colin Guthrie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Pieter du Toit wrote:
>> Hi
>>
>> I have this weird proble
I ran a print_r on it and this is the results
Array ( [txtPhoto] => Array ( [name] => g1.jpg [type] => image/pjpeg
[tmp_name] => /tmp/php3qkA4A [error] => 0 [size] => 17008 ) )
The image received here must be inserted into a database as binary it looks
like it.
"Colin Guthrie" <[EMAIL PROTECTED
Have you tried print_r($_FILES); to see all the values in the variable?
>
> Its difficult to see whats going on as you posted your whole file.
>
>
>
> -Original Message-
> From: Pieter du Toit [mailto:[EMAIL PROTECTED]
> Sent: 05 March 2008 12:38
> To: php-general
Pieter du Toit wrote:
> Hi
>
> I have this weird problem, when i select a file to upload, the variable
> arrives as an array at the action php file, this is the code, and the
> variable name is txtPhoto
I'd give a shorter example. People don't want to read through all your
code..
Also you shou
: Variable post as array
Just to add, if i try to echo the $_FILES['txtPhoto']['temp_name'] it tells
me that temp_name is also an array, but when i echo
$_FILES['txtPhoto']['name'] it gives me the correct name. Also with a
vardump i can see that temp name is [&
18 matches
Mail list logo