php-windows Digest 23 Oct 2002 01:44:20 -0000 Issue 1401
Topics (messages 16468 through 16485):
Problems Posting!
16468 by: James Meers
16469 by: Ignatius Reilly
Problem with W2K + IIS 5.0 + PHP 4.2.2 running as module (isapi)
16470 by: Brian 'Bex' Huff
Re: picking files (server side) - need help please
16471 by: David Elliott
Question
16472 by: James Meers
16474 by: Ignatius Reilly
16475 by: Stephen Edmonds
16478 by: Richard Allsebrook
Re: Merging C++ code or export DLL files in php application
16473 by: Brian 'Bex' Huff
PHP and databases? ...without MySQL and such
16476 by: Negretti, John (CCI-San Diego)
Re: [PHP] PHP and databases? ...without MySQL and such
16477 by: Maxim Maletsky
16479 by: Adam Voigt
16480 by: John W. Holmes
16482 by: Maxim Maletsky
Re: slow form / server problem
16481 by: Richard Allsebrook
this one's got me stumped...
16483 by: db
16484 by: Dash McElroy
16485 by: db
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Below is a script i am running, the if and else statements dont seem to be
working, it doesnt seem to be picking up the passed values even though the script i
have below picks it up.
Would it have anything to do with the way i have installed PHP? i am running
Windows 2000 server, with PHP 4
Any help would be appreciated
Cheers
James
<?php
if (isset($mode)) {
echo"PASSED VALUES:<br>";
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
} else {
echo"
<form action=\"test_script.php\" name=\"test\" id=\"test\">
<input type=\"hidden\" name=\"mode\" value=\"test\">
<input type=\"text\" name=\"email\"><br>
<input type=\"submit\" name=\"submit\" value=\"submit\">
</form>
";
}
echo"DEFAULT VALUES:<br>";
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
?>
--- End Message ---
--- Begin Message ---
You must use list($key, $value) exactly as is;
if you want to rename your key/ value variables for clarity (which you
certainly should do), do it just after:
also better use $_POST:
while (list($key, $value) = each($_POST)) {
$name = $key ;
HTH
Ignatius
____________________________________________
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 3:28 PM
Subject: [PHP-WIN] Problems Posting!
> Below is a script i am running, the if and else statements dont seem to be
working, it doesnt seem to be picking up the passed values even though the
script i have below picks it up.
>
> Would it have anything to do with the way i have installed PHP? i am
running Windows 2000 server, with PHP 4
>
> Any help would be appreciated
>
> Cheers
>
> James
>
> <?php
> if (isset($mode)) {
> echo"PASSED VALUES:<br>";
> while (list($name, $value) = each($HTTP_POST_VARS)) {
> echo "$name = $value<br>\n";
> }
> } else {
> echo"
> <form action=\"test_script.php\" name=\"test\" id=\"test\">
> <input type=\"hidden\" name=\"mode\" value=\"test\">
> <input type=\"text\" name=\"email\"><br>
> <input type=\"submit\" name=\"submit\" value=\"submit\">
> </form>
>
>
> ";
> }
> echo"DEFAULT VALUES:<br>";
> while (list($name, $value) = each($HTTP_POST_VARS)) {
> echo "$name = $value<br>\n";
> }
> ?>
>
>
--- End Message ---
--- Begin Message ---
The SAPI module for IIS 5.0 for PHP 4+ still has a few problems... I
haven't seen that one yet, but Ive seen 2 other access violations that
haven't been fixed yet. It seems that every new security patch for IIS
breaks PHP in some way.
I'd recommend running it as a CGI executable instead...
--
Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424
Hi,
I'm getting the message : PHP has encountered an Access Violation at
012929AE
Does anyone know what this could be? Is this a known issue?
Previously i as running php 3.0.15 as CGI and never had this problem.
Carlos André Marques Moreira
SENAI-CE / CETAE
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi Aidal
On 22 October 2002 at 15:07:04 +0200 (which was 14:07 where I live) Aidal
graced us with these comments
< ... >
> I browse my own PC for files.
well you can not browse for them.
< ... >
> Assuming that those pictures have already been uploaded to a certain dir on
> the web server, can this be done and if so how would one do this?
Have a look at the code below it might give you a clue.
==========8<=============================================================
<table summary="file list" border="1" align="center">
<?php
$handle=opendir('.');
while ($file = readdir( $handle))
if( $file != ".." && $file != "." && $file != "index.php")
{
echo "<tr>\n<td>\n<a href='$file'>$file</a></td>\n".
"<td align='center'>".sprintf( '%1.3f', filesize( $file) / (1024*1024)).
" Mb</td>\n".
"<td align='right'>\n".date('d-m-Y H:i',filemtime($file))."</td>\n</tr>\n";
}
closedir( $handle);
?>
</table>
==========8<=============================================================
--
Bye, _______________________________________________
David | David Elliott | Software Engineer |
_________________________| [EMAIL PROTECTED] | PGP Key ID 0x650F4534 |
| Respect, bah! It's more fun to make people afraid. |
--- End Message ---
--- Begin Message ---
Thanks for the help with my previopus query, i havea new question now!
How can i do an IF statement with multiple values? e.g.:
if (isset($id)) {
if (isset($email)) {
blah
} else {}
}else {}
can i use it within the same if?
if (isset($id and $email)) {
}else{
}
????????????????????????????
Cheers
James
--- End Message ---
--- Begin Message ---
study the if / elseif / else structure in the manual.
Ignatius
____________________________________________
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 4:57 PM
Subject: [PHP-WIN] Question
> Thanks for the help with my previopus query, i havea new question now!
>
> How can i do an IF statement with multiple values? e.g.:
>
> if (isset($id)) {
>
> if (isset($email)) {
>
> blah
>
> } else {}
>
> }else {}
>
> can i use it within the same if?
>
> if (isset($id and $email)) {
>
> }else{
>
> }
>
> ????????????????????????????
>
> Cheers
>
> James
>
>
>
>
--- End Message ---
--- Begin Message ---
IF ( $Cheese == "yellow" && $Smell == "smelly " ) {
print "Eat the cheese!";
}
As you can see, you can link two IFs using && - which means if A and if B
You can also use for or || - if a OR if B
IF ( $Cheese == "yellow" || $Cheese == "Blue" ) {
print "Eat the cheese!";
}
Finally, you can use ELSEIF...
IF ( $Cheese == "yellow" ) {
print "Eat the cheese!";
}
ELSEIF ( $Cheese == "green" ) {
print "Green Cheese? I don't think so!";
}
ELSE {
print "I don't eat $Cheese coloured cheese";
}
I hope this makes things simple
Stephen
----- Original Message -----
From: "James Meers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 3:57 PM
Subject: [PHP-WIN] Question
> Thanks for the help with my previopus query, i havea new question now!
>
> How can i do an IF statement with multiple values? e.g.:
>
> if (isset($id)) {
>
> if (isset($email)) {
>
> blah
>
> } else {}
>
> }else {}
>
> can i use it within the same if?
>
> if (isset($id and $email)) {
>
> }else{
>
> }
>
> ????????????????????????????
>
> Cheers
>
> James
>
>
>
>
--- End Message ---
--- Begin Message ---
You almost had it ;-)
if (isset($id) and isset($email))
{
blah
}
"James Meers" <[EMAIL PROTECTED]> wrote in message
news:CB8DA9AF0B85D948B7A3F404B49C02A70F512F@;vendac01.uk.venda...
> Thanks for the help with my previopus query, i havea new question now!
>
> How can i do an IF statement with multiple values? e.g.:
>
> if (isset($id)) {
>
> if (isset($email)) {
>
> blah
>
> } else {}
>
> }else {}
>
> can i use it within the same if?
>
> if (isset($id and $email)) {
>
> }else{
>
> }
>
> ????????????????????????????
>
> Cheers
>
> James
>
>
>
>
--- End Message ---
--- Begin Message ---
I would suggest writing a command-line interface to your C++ code, then
evoke it with either 'system' or 'exec'.
If you really want to be lazy, you can check out the w32api extension:
http://www.php.net/manual/en/ref.w32api.php
You can use it to directly access Microsoft DLLs, register functions,
and call them... its an experimental extension tho, so stability is
unknown, but it works on my box ;) Here's a sample that ships with the
source code to get the uptime, and open a MFC dialog box to display it:
<?php
define("MB_OK", 0);
dl("php_w32api.dll");
w32api_register_function("kernel32.dll",
"GetTickCount", "long");
w32api_register_function("User32.dll",
"MessageBoxA", "long");
$ticks = GetTickCount();
$secs = floor($ticks / 1000);
$mins = floor($secs / 60);
$hours = floor($mins / 60);
$str = sprintf("You have been using your computer for:".
"\r\n %d Milliseconds, or \r\n %d Seconds".
"or \r\n %d mins or\r\n %d hours %d mins.",
$ticks, $secs, $mins, $hours, $mins - ($hours*60));
MessageBoxA(NULL, $str, "Uptime Information", MB_OK);
?>
--
Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424
Well, the story is that I have developed a MFC database application with
MS-Access database and i want to upgrade it. The application has many and
complex modules, written in C++, compiled with Visual C++ 6.0. I want to
rewrite the application in PHP based on MySql database. I don't want to
write the whole application, I want to know if there's a way to merge C++
code in a PHP application or better to import some DLL functions?
Any ideas?
Thanks in advance.
--- End Message ---
--- Begin Message ---
Hello All,
I am somewhat new to PHP and I have a question relating to FLAT FILE
databases. First let me give an introduction to my question.
I used to work at a company (www.miva.com) where we developed our own scripting
language "Miva Script", so my only experience with PHP was for comparison and such.
The company was not doing so good and was barley afloat, so I left. In my efforts to
find a new scripting language I choose PHP over ColdFusion, even though Miva Script
was so similar to ColdFusion. I am loving PHP, I never realized just how extensive
PHP is. Now I am at a big company where "red tape" has to be dealt with before I
could get access to a database server. With the Miva Script language it has it's own
built-in database (dBASE-DBF), so databases were never a problem with web development.
So, I am stuck with either using PHP and finding a solution "or" reverting to Miva
Script, which I do NOT want to do, of course I want to stay with PHP. I have been
doing some research on google.com and such and have not found too much information on
PHP with Flat File or DBF databases. I did find some PHP scripts working with Flat
File databases, but not really what I need. Does anyone have any suggestions, or is
PHP mostly just for MySQL and such.
I am developing some PHP classes/functions that are utilizing "file()" and "array()"
to read and edit my flat files. It's not perfected yet and I am running into
difficulties here and there and this is why am I asking for any opinions or comments
on available resources. When I get done with it I'll post it for free at
www.ideablue.com (my personal site). Well, I do give thanks in advance for any help.
NOTE: I think PHP is a great language and I do hope to stick with it. There are many
great resources like www.phpbuilder.com, www.phpbeginner.com and the extensive
documentation at www.php.net. Thanks to all that help us new PHP developers.
John Negretti
Web Applications Developer
Cox Communications www.cox.com
--- End Message ---
--- Begin Message ---
"Negretti, John (CCI-San Diego)" <[EMAIL PROTECTED]> wrote... :
> Does anyone have any suggestions, or is PHP mostly just for MySQL
> and such.
PHP supports most of the databases existing on the earth. This should
mean to you that, if your client wants a DB-driven website, you simply
set a mySQL or PostgreSQL or anything else you wish, depending on the
project size, for them and voila!
> I am developing some PHP classes/functions that are utilizing
> "file()" and "array()" to read and edit my flat files.
Flat files are not suggested as they are VERY, VERY limited (with any
language). Use mySQL or PostgreSQL, those are Open Sources and are free
for use. No much development is required for using them. Quite simple.
So, my final suggestion to you is to actually stick to a database, not
Flat Files for ANYTHING you do in feature. And, PHP, of course.
> NOTE: I think PHP is a great language and I do hope to stick with it.
> There are many great resources like www.phpbuilder.com,
> www.phpbeginner.com and the extensive documentation at www.php.net.
Thanks for liking PHP Beginner :) I made it!
> Thanks to all that help us new PHP developers.
Any time :)
---
Maxim Maletsky
[EMAIL PROTECTED]
www.PHPBeginner.com // PHP for Beginners
www.maxim.cx // my Home
// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
--- End Message ---
--- Begin Message ---
Well, flat files are fairly limiting, but if you've looked into open
source solutions like MySQL (http://www.mysql.com) and still want to use
them, I'm sure there's some kind of PHP-Class that will let you do this.
If not, write your own, or just store your data in a form of comma
deliminated form and import/export it each time you access it, slow, but
effective in not using a database and keeping the data well organized.
Adam Voigt
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
PHP has support (although depreciated) for dbase databases, dbm
databases, etc. Check the manual page, there are many types of databases
supported, including a couple flat file versions. Why re-create the
wheel?
I understand the "red tape", being in the military. I don't see why it
would be hard to get PostgreSQL or MySQL support, though, there is zero
cost to the company.
---John Holmes...
PS: Miva? Heh...I remember _almost_ learning that...but I found PHP
before I got too interested in it...
> -----Original Message-----
> From: Negretti, John (CCI-San Diego) [mailto:John.Negretti@;cox.com]
> Sent: Tuesday, October 22, 2002 12:00 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] PHP and databases? ...without MySQL and such
>
> Hello All,
>
> I am somewhat new to PHP and I have a question relating to FLAT
FILE
> databases. First let me give an introduction to my question.
>
> I used to work at a company (www.miva.com) where we developed our own
> scripting language "Miva Script", so my only experience with PHP was
for
> comparison and such. The company was not doing so good and was barley
> afloat, so I left. In my efforts to find a new scripting language I
> choose PHP over ColdFusion, even though Miva Script was so similar to
> ColdFusion. I am loving PHP, I never realized just how extensive PHP
is.
> Now I am at a big company where "red tape" has to be dealt with before
I
> could get access to a database server. With the Miva Script language
it
> has it's own built-in database (dBASE-DBF), so databases were never a
> problem with web development. So, I am stuck with either using PHP
and
> finding a solution "or" reverting to Miva Script, which I do NOT want
to
> do, of course I want to stay with PHP. I have been doing some
research on
> google.com and such and have not found too much information on PHP
with
> Flat File or DBF databases. I did find some PHP scripts working with
Flat
> File databases, but not really what I need. Does anyone have any
> suggestions, or is PHP mostly just for MySQL and such.
>
> I am developing some PHP classes/functions that are utilizing "file()"
and
> "array()" to read and edit my flat files. It's not perfected yet and
I am
> running into difficulties here and there and this is why am I asking
for
> any opinions or comments on available resources. When I get done with
it
> I'll post it for free at www.ideablue.com (my personal site). Well, I
do
> give thanks in advance for any help.
>
> NOTE: I think PHP is a great language and I do hope to stick with it.
> There are many great resources like www.phpbuilder.com,
> www.phpbeginner.com and the extensive documentation at www.php.net.
> Thanks to all that help us new PHP developers.
>
> John Negretti
> Web Applications Developer
> Cox Communications www.cox.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Darren,
working as consultant, I get this question asked all the time - None of
my clients wants to lose their money on development.
Here's what I think:
On Tue, 22 Oct 2002 17:15:05 -0400 (EDT) Darren Henderson <[EMAIL PROTECTED]>
wrote:
> All things are relative.
Correct. They always are.
> Data bases are not always appropriate. Sometimes they may even be
> detrimental.
> There is a cost in complexity, resources and support when using a data base.
>
> MySQL is "expensive", in terms mentioned above, if all you are doing is
> maintaing a configuration file,
Yes, for configuration purposes it is more clever using flat files. BUT,
for as long as you don't need (and know you'll never need) any of the
following three things:
1. Anything more than just one single PHP file made in your text editor.
2. Dynamically modifying your configuration files.
3. Per-user based configurations like to store things for later,
frequent use.
> or a low volume shopping cart system,
Completely wrong. Normally, (at 90% at least) when you think of running
a shopping cart, even of a low volume but with use of PHP, you'd think
of database as it is:
1. Simpler developing a database in SQL than in some Flat Files logic.
This means investment saving.
2. Having the possibility of an unpredicted business growth. For
instance, some inexperienced developers not know that a Linux system
cannot hold over a certain amount of files within the same directory
(1024 I think), and they all of the sudden end up re-developing the
whole thing because data becomes too large to store and system
crashes. What means the day business became more profitable you lose
a bunch of money for the downtime or speedy-redeveloping. A very
expensive risk to run. Always, unless you are selling one single
service that can never be more than just that one. But again, the
flat HTML pages will do :)
Two very good reasons why to start an e-commerce site from a database
even if there are only 10 things to store.
> or looking for simple access control.
Agreed and disagreed: Yes, it may sound that it is easier to access a
file than a database, but at the same time there are less worries
maintaining that file.Remember, you'll need to be locking AND unlocking
a self-updating file as there is a risk of corrupting and lose all your
data, besides getting errors all the time, on multi-threaded web servers
if the file happens to be saved simultaneously within different
requests. Very possible to happen with even 100 visits per day.
Plus, you forgot to mention the three most important things:
1. Data Integrity:
Something that needs to be taken care of in order not to mess the
data the data. Similar to above.
2. Security:
A file can be read by anything within the server while DB needs a
password. Few that think a DB is "expensive" own their dedicated
servers.
3. Performance:
Just store a few variables will work with a flat file, but doing a
little search within the data will decrease site's response times
tremendously.
> Using a db to store php hashes in can be remarkably simple and effective in
> the right situations.
Indeed it is.
Conclusion:
1. Flat files - for site configurations
2. Database - for data manipulations
There are really few (almost none) cases when you should to store within
Flat Files what you can call "DATA" instead of "CONFIGURATION". One of
these big reasons, ironically, is: one doesn't have a database :)
Take care,
---
Maxim Maletsky
[EMAIL PROTECTED]
www.PHPBeginner.com // PHP for Beginners
www.maxim.cx // my Home
// my Wish List: ( Get me something! )
http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
--- End Message ---
--- Begin Message ---
wise words...
"Jim Hunter" <[EMAIL PROTECTED]> wrote in message
news:3DA5F656.000011.03676@;JHUNTER...
My first suggestion is to shut down the server then start it back up to see
if the problem goes away. If it did, then some piece of software you are
running has a memory leak or is consuming memory without releasing it back
to the OS and it is choking your throughput (I get this from time to time).
If that does not work, then start from the ground up and test to see where
the problem is. Create a static HTML page, no PHP, and see how fast it loads
Then add some standard PHP calls, no database, and see how fast that loads.
Last, start adding database calls and see if it is the database in general
or some specific SQL call you are making that is slowing it down. Always
remember when troubleshooting, take small steps, otherwise you may not know
what you did to fix or create a problem. Once you know what is causing the
problem, then you can try to fix it, but you must first locate the cause of
the problem.
Jim
-------Original Message-------
From: Omar Campos
Date: Thursday, October 10, 2002 02:49:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] slow form / server problem
Hi. I run php in win2k server, IIS and MS SQL Server 2k.
I've created some data bases and tables. On the beginning, sending a php
form (through the intranet) was quick. Now, it spends 32 seconds (sometimes
less) to send a form.
I've tried on a empty data base but it's still slow. I don´t have a clue
about what could it be?
Maybe the HDD of the server, maybe the SQL Server....
Could you help me.
Thank you so much.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
--- End Message ---
--- Begin Message ---
...which isn't that difficult cuz i'm a dunce, but anwyay....
i'm trying to upload multiple files at once using the example in the php
doc's. i want to be able to upload up to 20 files at once, but less than
that at any time.
this is what i have (basically):
<input class='tbox' type='file' name='userfile[]' size='50'>
listed out in a table 20 times and followed by:
<input class='button' type='submit' name='submit' value='upload'>
"tbox," refers to a style in a css file. anyway, i'm then trying to
determine the size of the array with:
$size = sizeof($_FILES['userfile']);
i would think this would work, however, no matter the number of files i
select, $size=5. always!
is there something wrong with my syntax here? or is there a better way to do
this with this type of array? incidentally, i have register_globals turned
off -- not sure if that would affect anything....
thx.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.406 / Virus Database: 229 - Release Date: 10/21/2002
--- End Message ---
--- Begin Message ---
db;
What I would do (and I have not done this...) would be this:
Make the page ask for one file, then upload it, then automatically refresh
(via header("Location: ".$_SERVER['PHP_SELF']); or something similar, and
ask for another file. I think this is how Yahoo's mail program does that.
A little cumbersome, but it should work.
-Dash
-----Original Message-----
From: db [mailto:postmaster@;kouryuu.com]
Sent: Tuesday, October 22, 2002 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] this one's got me stumped...
...which isn't that difficult cuz i'm a dunce, but anwyay....
i'm trying to upload multiple files at once using the example in the php
doc's. i want to be able to upload up to 20 files at once, but less than
that at any time.
this is what i have (basically):
<input class='tbox' type='file' name='userfile[]' size='50'>
listed out in a table 20 times and followed by:
<input class='button' type='submit' name='submit' value='upload'>
"tbox," refers to a style in a css file. anyway, i'm then trying to
determine the size of the array with:
$size = sizeof($_FILES['userfile']);
i would think this would work, however, no matter the number of files i
select, $size=5. always!
is there something wrong with my syntax here? or is there a better way to do
this with this type of array? incidentally, i have register_globals turned
off -- not sure if that would affect anything....
thx.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.406 / Virus Database: 229 - Release Date: 10/21/2002
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
thanks, Dash. I'm sure that would work, but i'm try to set up a page that
allow a user to upload pictures for use in a photo gallery that i've
scripted (i know i'm reinventing the wheel here). a user might have 50 or a
100 pics, and to upload one by one may be a bit tedious.
does someone have an alternative approach that accomplishes what i'm trying
to do? from what i've read, $_FILES seems to contain an associative array.
i'm not sure what that means, but perhaps that's things off.
i got this from a comment in the docs:
The $_FILES variable is not very well documented. Beware that it contains an
associative array:
array(1) {
["File"]=>
array(5) {
["name"]=>
string(12) "brahhh.jpg"
["type"]=>
string(11) "image/pjpeg"
["tmp_name"]=>
string(14) "/tmp/php2Uyz0c"
["error"]=>
int(0)
["size"]=>
int(36950)
}
}
it seems that $_FILES['userfile'] has a default size of 5. but i'm not sure
how to...comprehend this. any ideas on how to get around this?
thanks.
--db
"Dash McElroy" <[EMAIL PROTECTED]> wrote in message
news:ABA3F1F1A223D411BE6C006008A6F7E2604D86@;MSX1-PTON...
> db;
>
> What I would do (and I have not done this...) would be this:
>
> Make the page ask for one file, then upload it, then automatically refresh
> (via header("Location: ".$_SERVER['PHP_SELF']); or something similar, and
> ask for another file. I think this is how Yahoo's mail program does that.
>
> A little cumbersome, but it should work.
>
> -Dash
>
> -----Original Message-----
> From: db [mailto:postmaster@;kouryuu.com]
> Sent: Tuesday, October 22, 2002 5:25 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] this one's got me stumped...
>
>
> ...which isn't that difficult cuz i'm a dunce, but anwyay....
>
> i'm trying to upload multiple files at once using the example in the php
> doc's. i want to be able to upload up to 20 files at once, but less than
> that at any time.
>
> this is what i have (basically):
>
> <input class='tbox' type='file' name='userfile[]' size='50'>
>
> listed out in a table 20 times and followed by:
>
> <input class='button' type='submit' name='submit' value='upload'>
>
> "tbox," refers to a style in a css file. anyway, i'm then trying to
> determine the size of the array with:
>
> $size = sizeof($_FILES['userfile']);
>
> i would think this would work, however, no matter the number of files i
> select, $size=5. always!
>
> is there something wrong with my syntax here? or is there a better way to
do
> this with this type of array? incidentally, i have register_globals
turned
> off -- not sure if that would affect anything....
>
> thx.
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.406 / Virus Database: 229 - Release Date: 10/21/2002
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.406 / Virus Database: 229 - Release Date: 10/21/2002
--- End Message ---