[PHP] Browsing directory

2002-11-18 Thread Helen Muller

I would like to create a web page which allow people to browse the directory structure 
and the files listed in every directory. If you have experience about that, could you 
kindly give me some advice or references? Thanks in advance.

Cheers,

Helen

 




-
Get a bigger mailbox -- choose a size that fits your needs.



Re: [PHP] Problem with Uploading Many Files (22)

2001-09-13 Thread Helen

Could that possibly be triggering the max file limit?

Helen

- Original Message -
From: Jani Rautiainen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 13, 2001 5:27 PM
Subject: Re: [PHP] Problem with Uploading Many Files (22)


 On Windows it should be the latest, because I just downloaded it 2 weeks
 ago... On Linux (my client's server) I assume it's one of the latest
also...

 Matthew Loff [EMAIL PROTECTED] wrote in message
 007501c13bc8$520f7fd0$0ce60281@bang">news:007501c13bc8$520f7fd0$0ce60281@bang...
 
  What version of PHP are you running?
 
  There were a few bugs in the file upload code that have been fixed in
  recent relases of PHP...
 
  --Matt
 
  -Original Message-
  From: Jani Rautiainen [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 12, 2001 3:51 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Problem with Uploading Many Files (22)
 
 
  I have been fighting with an annoying problem for couple days.. If I try
  to upload more than 22 files (no matter what size), the last file
  doesn't upload correctly..
 
  I don't know PHP very well, so I don't know whether there is a way to
  configure the server to get around the problem...
 
  In the beginning I thought it was a problem with the java applet that is
  used to upload the files, but then I tested with a normal html form
  (below) and problem was still there, so I'm assuming it's PHP (I've
  tested it with both Win/IIS and Linux/Apache configurations)..
 
  I have the following piece of code to test the feature... The output
  lists all the files, but the last file doesn't have size set (name is
  correct
  though) and the copy function gives an error...
 
  form action=upload_result.php method=POST
  enctype=multipart/form-data File 1: input name=file1
  type=filebr File 2: input name=file2 type=filebr File 3:
  input name=file3 type=filebr File 4: input name=file4
  type=filebr File 5: input name=file5 type=filebr File 6:
  input name=file6 type=filebr File 7: input name=file7
  type=filebr File 8: input name=file8 type=filebr File 9:
  input name=file9 type=filebr File 10: input name=file10
  type=filebr File 11: input name=file11 type=filebr File 12:
  input name=file12 type=filebr File 13: input name=file13
  type=filebr File 14: input name=file14 type=filebr File 15:
  input name=file15 type=filebr File 16: input name=file16
  type=filebr File 17: input name=file17 type=filebr File 18:
  input name=file18 type=filebr File 19: input name=file19
  type=filebr File 20: input name=file20 type=filebr File 21:
  input name=file21 type=filebr File 22: input name=file22
  type=filebr File 23: input name=file23 type=filebr File 24:
  input name=file24 type=filebr input type=submit /form
 
  and in the receiving side there is the following code
 
  ?
   $filedir = c:\\filestorage\\;
   $count = 1;
   foreach ( $HTTP_POST_FILES as $file ) {
$filename = $file['name'];
$filesize = $file['size'];
   echo File name $filename? size: $filesizebr\n;
copy($file['tmp_name'], $filedir.$count..jpg);
$count++;
  }
  ?
 
 
 
 
  --
  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]
 



 --
 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]


-- 
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]




Re: [PHP] limiting rows and pages like google -- again

2001-09-13 Thread Helen

  Do you want to list all the pages of posts or just a link to the next 20
  items?

 On the first page, 20 and links to the other items that when selected will
 display the list based on the selection.

 One thing to remember is that the ids will not be in squence.

Here's a function I wrote to do that. I can't promise that it isn't still
buggy, but it's been working on my forum for a while now.

/*/

/* print nextLinks
* Prints a list of next page links for a list of items
* spanning more than one page.
* The links look something like this:
* Page 1 | 2 | 3
* It cycles through the array of IDs supplied by the user
* and prints one every itemsPerPage interval
* param idArray - an array of all the id numbers of the thing that the menu
relates to
* param pageURL - the actual url for the pages that are linked
* param itemsPerPage - the number of items per page
* param currentID - the ID of the last item on the current page
*/

function printNextLinks($idArray, $pageURL, $itemsPerPage, $currentID,
$direction) {
// variables
$postCount = count($idArray);
$postPlace = 0;
$iteration = 1;
$threadLinks = ;
$lastID = $idArray[$postCount - 1];
$firstNextPage = $idArray[0];

// we only want the pages link if there is more than one page
if ($postCount  $itemsPerPage  $firstNextPage != '') {
while($postPlace = $postCount  $firstNextPage != '') {
$thisID = $idArray[$postPlace];
$nextPlace = $postPlace + $itemsPerPage;
$lastCurrentPage = $idArray[$nextPlace - 1];
$firstNextPage = $idArray[$nextPlace];

if($lastCurrentPage == ) {
 $lastCurrentPage = $thisID;
} // end if

if(($currentID == $lastCurrentPage)  ($thisID != '') 
$direction == desc) {
$threadLinks .=  $iteration |;
} else if (($currentID == $lastID)  ($firstNextPage == '') 
$direction == desc) {
$threadLinks .=  $iteration |;
} else if (($currentID == $lastCurrentPage)  ($thisID != ''))
{
$threadLinks .=  $iteration |;
} else if (($currentID == $lastID)  ($firstNextPage == '')) {
$threadLinks .=  $iteration |;
} else {
$threadLinks .=  A
HREF=\.$pageURL.ID=$thisID\$iteration/A |;
} // end else

// move everything along
$postPlace = $nextPlace;
$iteration ++;
} // end while

// remove the last line from the threadlinks
$threadLinks = subStr($threadLinks, 0, -1);
echo  $threadLinks | ;
} // end if
} // end function

Helen


-- 
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]




Re: [PHP] equivelant of ASP's #include file?

2001-09-13 Thread Helen

 !-- #include file = filename.txt --
 
 Can anyone tell me what the PHP equivelant might be?

? include(filename.txt); ?

It's interesting ASP uses the same format at SSI includes. 

Helen


-- 
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]