php-windows Digest 26 Aug 2003 13:54:10 -0000 Issue 1887
Topics (messages 21247 through 21251):
Re: Array question
21247 by: Warren Vail
Upload aborted with timeout
21248 by: M.Staiger
21249 by: M.Staiger
File upload error with 4.3.1 and NT
21250 by: Kris Jurka
Re: End of Page characters
21251 by: Gerardo Rojas
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 ---
I am beginning to see, I think, what you are dealing with, the pos()
function (and others) are used to step thru arrays moving a cursor pointer
as you go, and logically would be connected with next() and prev() to step
forward and backward. This is more logical to use when the keys assigned
are not consecutive (0, 1, 2, 3, etc).
Also sounds like you want to insert occurrences between occurrences already
in the array. I think you used the term store. This can be done with php
arrays (as in perl) when the associated key is actually a data item. There
may be other ways, but I always test for the presence of an occurrence by;
if(isset($datatable[$key])) update occurance...
else $datatable[$key] = insert new occurance...
PHP arrays can also be multi-dimensional;
$datatable[$key] = array($column1, $column2);
and, if it make sense all new entries can be added to the end of an array
$datatable[] = array($column1, $column2);
and resorted to place the entire array into order.
sort($datatable);
php multi-dimensional arrays can also be referrenced a multitude of ways. I
frequently resort to references like
$datatable[$rowno][$colno] = insert value;
$recallvalue = $datatable[$rowno][$colno];
This may not answer your questions, but perhaps give you a few more ideas.
Just try a few to learn more.
good luck,
Warren Vail
[EMAIL PROTECTED]
-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 1:55 AM
To: 'Warren Vail'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Array question
Well its not exactly what I was looking for but you gave me some ideas,
but still got this small problem:
If I know the value in the array, say for example 49. Then I want to
store the previous and next value in the array? I know the other way
when I have the position, just use pos($dataarray) then like you sad
$dataarray($key+1), that's easy. But the other way????
-----Original Message-----
From: Warren Vail [mailto:[EMAIL PROTECTED]
Sent: den 25 augusti 2003 09:33
To: Disko_kex; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Array question
in my experience, using numeric indices to your array, you can deposit
and
reference occurances as follows; however your reference is not a valid
array definition;
[0] => 1 [1] => 2 [2] => 3 ... [99] => 100 (I don't believe these are
valid
as a definition)
numeric indices would be defined as follows;
array(0 => 1, 1 => 2, 2 => 3 .... 99 => 100);
$x = $dataarray[50];
$dataarray[50 - 2] = $x;
$dataarray[50 + 1] = $x;
if($dataarray[71] == 74) do this....
On the other hand, if the indices is alpha-numeric string
representations of
numbers,
array("0" => 1, "1" => 2, "2" => 3 ... "99" => 100)
you will need to use some other tricks to access them.
hope this is what you are looking for, you used several terms like
"select"
and "know the value" of that are somewhat ambiguous ;-)
Warren Vail
[EMAIL PROTECTED]
-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 24, 2003 11:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Array question
If I have an array like this > [0] => 1 [1] => 2 [2] => 3 ... [99] =>
100
If I want to select [50] => 51 and store the value that's 2 positions
before and 1 position after, how can I do?
If I want to know what position value 71 have?
I have search the PHP-manual and found some functions as prev, next, pos
etc. But with these commands I have to loop thru the array every time to
reach the the values and positions. It has to be an easier way to do it.
// jocke
--- End Message ---
--- Begin Message ---
Hello NG,
for some reason we have problems with midsize to big file-uploads (around
5MB and bigger) that are performed by the website-visitors. It most likely
ends in a time out (60 sec), even though the internet-connection is
sufficiant (server AND client). We already tried everything (known to us):
- set max_execution_time to 1 hour
- post_max_size = 50M
- upload_max_filesize = 50M
- ...
None of these parameters seems to have an effect on the system!?
At another point I read that there might be parameters for the webserver iis
to set for execution?
Thankful for any hint ..
Marc
--- End Message ---
--- Begin Message ---
forgot this one :
win2k server, iis 5.0, php 4.3.2 ISAPI
"M.Staiger" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hello NG,
>
> for some reason we have problems with midsize to big file-uploads (around
> 5MB and bigger) that are performed by the website-visitors. It most likely
> ends in a time out (60 sec), even though the internet-connection is
> sufficiant (server AND client). We already tried everything (known to us):
> - set max_execution_time to 1 hour
> - post_max_size = 50M
> - upload_max_filesize = 50M
> - ...
>
> None of these parameters seems to have an effect on the system!?
>
> At another point I read that there might be parameters for the webserver
iis
> to set for execution?
>
> Thankful for any hint ..
>
> Marc
--- End Message ---
--- Begin Message ---
I'm experiencing a rather bewildering problem when uploading files.
Most of the time file uploads work as expected, but on certain files
they mysteriously disappear and do not appear the $_FILES. The result
of print_r($_FILES) for these certain files looks like this:
Array ( [file] => Array ( [name] = cd33.iso [type] => [tmp_name] =>
[error] => 3 [size] => 0 ) )
I've checked all of the various size and time limits in php.ini and have
uploaded much larger files successfully. Has anyone seen anything like
this before? It is running PHP 4.3.1 on Apache 1.3.27 on an NT 4.0
system.
I tried to track down what error is 3. From my very limited
understanding of the source code this seems to be coming from
main/rfc1867.c
Notably:
#define UPLOAD_ERROR_C 3 /* Partially uploaded */
This is later returned when an fwrite of a buffer returns the number of
bytes written as less than those in the buffer.
Can anyone confirm that this is indeed the source of the error or have
any insight into what actually might be causing it?
Kris Jurka
--- End Message ---
--- Begin Message ---
Yes, holding down the ALT key and using the numeric keypad and typing 014, does force
a page break in MS Word. My question now is how do I detect these values in PHP? I
want to take an MS Word document and parse it with PHP, breaking up each page (in a
multiple page MS Word document) into a file. These files will eventually turn into a
HTML files? Any suggestions?
--
Gerardo S. Rojas
mailto:[EMAIL PROTECTED]
-----Original Message-----
From: Sven Schnitzke [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 2:33 AM
To: Gerardo Rojas
Subject: AW: [PHP-WIN] End of Page characters
Hi,
To be precise: in MS Winword
- \n (ASCII 010) is an unprintable character with no special meaning.
- ASCII 011 makes up a forced newline within a paragraph
- \r (ASCII 013) makes up a paragraph break
- ASCII 014 makes up a page break
Verify by entering these holding down ALT and entering all three digits
of the ASCII code _using the numeric keypad_.
Set extras->options->display (section unprintable characters)->all to show.
Raw textfiles holding these special chars _should_ keep the meaning
through conversion. Did it in the past versions anyway, but didn't use it
for
quite a while now.
Would you mind letting me know if it still works?
--
Sven
> -----Ursprüngliche Nachricht-----
> Von: Gerardo Rojas [SMTP:[EMAIL PROTECTED]
> Gesendet am: Montag, 25. August 2003 17:53
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] End of Page characters
>
> Quick question: Is there any special characters that make up a Page
Break in MS Word? I know that "\r\n" make a line break and carriage
return. Is there anything for Page Break?
>
>
> --
> Gerardo S. Rojas
> mailto:[EMAIL PROTECTED]
>
>
--- End Message ---