[PHP] i wanna join

2010-10-05 Thread Xuan Huy
-- 
Ngô Xuân Huy


[PHP] RE: Multiple file upload

2009-11-11 Thread Huy Nguyen
Do you mean 3 forms, each having a file upload input?  Or 1 form with 3 file 
upload inputs?

If you have 3 forms, then the user can only submit one form at a time.  So your 
$_FILES would contain only one file.

If you have one form with 3 file upload, it depends on if they are the same 
name for the file input - whether they all are UPLOADIMAGE[], or each one is 
UPLOADIMAGE1, UPLOADIMAGE2, UPLOADIMAGE3, etc.




-Original Message-
From: Matthew Croud [mailto:m...@obviousdigital.com] 
Sent: Wednesday, November 11, 2009 9:10 AM
To: PHP General list
Subject: Multiple file upload

Dear lords of PHP,

I have a working image upload script that meets all my needs,
My question is I need to upload multiple images using the same form,

This is the PHP part I have so far, largely taken from a book:
_

$file_dir = /public_html/uploads;
foreach($_FILES as $file_name = $file_array) {
echo path: .$file_array[tmp_name].br/\n;
echo name: .$file_array[name].br/\n;

$UploadName = $file_array[name];

if (is_uploaded_file($file_array[tmp_name])) {
move_uploaded_file($file_array[tmp_name], $file_dir/. 
$file_array[name]) or die (Couldn't copy);
echo file was moved!br/;
}
}
_

Lets say the HTML from that sends data to this script has 3 upload  
forms that get send to $_FILES, would I access the data by modifying  
the following line from the above example:
...
foreach($_FILES[' UPLOADIMAGE1 '] as $file_name = $file_array) {
...

...
foreach($_FILES[' UPLOADIMAGE2 '] as $file_name = $file_array) {
...

...
foreach($_FILES[' UPLOADIMAGE3 '] as $file_name = $file_array) {
...

Thanks for reading!
Matt Cheezoid

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] include require directive

2002-08-13 Thread Huy

Thanks,

I thought I checked that already. Obviously, I use notepad in Win2000 to
edit the files, and save them as Unicode file, which Notepad put some
characters at the beginning of the file. Only when I use another editor was
I able to see those strange characters. After deleting them, the require
statement works fine. Again, thanks for the help. :)

James Green [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Tue, 2002-08-13 at 02:55, Huy wrote:
  But I do...
 
  If I left out the require statement all is well.. or I copy the
whole
  content of the included file.. it works fine. The problem is the require
  statement.

 Check the file for whitespace, anything outside ?..?php or
 spaces/blank lines above your first ?php in any of your files.

 James.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] include require directive

2002-08-12 Thread Huy

If I use either the include or require statement, PHP will generate some
lines in the browser. For example, I want the first line is Hello There..
echo (Hello There); but the line happens to be the third line after some
blank lines. So how do I turn that off??



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] include require directive

2002-08-12 Thread Huy

But I do...

If I left out the require statement all is well.. or I copy the whole
content of the included file.. it works fine. The problem is the require
statement.

James Green [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Mon, 2002-08-12 at 22:14, Huy wrote:
  If I use either the include or require statement, PHP will generate some
  lines in the browser. For example, I want the first line is Hello
There..
  echo (Hello There); but the line happens to be the third line after
some
  blank lines. So how do I turn that off??

 http://uk.php.net/manual/en/function.include.php

 Enclose your included scripts in ?php ... ?

 James





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Require vs include

2001-03-16 Thread NGUYEN DINH Quoc Huy

Hi

Can someone explain me what's the difference between include() and require() ??
I did not catch the explanation in the docs.
When should I use include() and when should I use require() ??

I'm not on the list so reply me to: [EMAIL PROTECTED]

Thnx

-- 
=
 NGUYEN DINH Quoc Huy (SnAKes)
   http://www.snakesbox.com/
  [EMAIL PROTECTED] - ICQ# 3398187
  telnet://snakesbox.com:/  -- Puissance 4
=



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]