Help displaying multiple word documents

This is a discussion on "Help displaying multiple word documents" within the Web Page Design section. This forum, and the thread "Help displaying multiple word documents are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Mar 29th, 2007, 13:29
New Member
Join Date: Mar 2007
Location: Southport
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Help displaying multiple word documents

Hi I want to display the file names of a folder full of word docs on a web page, without having to manually put each file name in.
I. Is it possible to automatically display the file names within the folder and link to them?
2. Does anyone know how to do this and can you help me.
Thanks in advance for any help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 29th, 2007, 13:35
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help displaying multiple word documents

With PHP you can open a folder and lists it's content. I can check tonight if I still use it somewhere on one of the sites I take care of and post it. I'm sure someone might chyme in and post one before I do but ... at least you'll have a few options
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Apr 10th, 2007, 09:15
New Member
Join Date: Mar 2007
Location: Southport
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help displaying multiple word documents

Quote:
Originally Posted by karinne View Post
With PHP you can open a folder and lists it's content. I can check tonight if I still use it somewhere on one of the sites I take care of and post it. I'm sure someone might chyme in and post one before I do but ... at least you'll have a few options
Hi Karinne, did you have any luck with that code?
Regards
Alex
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Apr 10th, 2007, 13:55
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help displaying multiple word documents

http://us.php.net/manual/en/function.ftp-nlist.php
http://us.php.net/manual/en/function.ftp-rawlist.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Apr 10th, 2007, 14:02
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help displaying multiple word documents

Ah sorry ... I completely forgot about this. I'll try to check this week.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Apr 10th, 2007, 15:37
New Member
Join Date: Mar 2007
Location: Southport
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help displaying multiple word documents

Hi Ryan, thanks for the links, but I'm way out of my depth , I wouldn't know where to start with the code (the one below for instance). In my naivety I thought there would be a small amount of code I could put into my html doc. If thats the case with the code below I don't even know where to put the path to the folder?
Regards
Alex

Here we go for a 100% working code...

<?

PHP: Select all


 
function cutspaces($str){
 *** while(
substr($str,0,1)==" "){$str=substr($str,1);}
 *** return 
$str;} 
PHP: Select all


$folders
=array();
$files=array();
 for(
$i=0;$i<sizeof($list);$i++){
 *** list(
$permissions,$next)=split(" ",$list[$i],2);
 *** list(
$num,$next)=split(" ",cutspaces($next),2);
 *** list(
$owner,$next)=split(" ",cutspaces($next),2);
 *** list(
$group,$next)=split(" ",cutspaces($next),2);
 *** list(
$size,$next)=split(" ",cutspaces($next),2);
 *** list(
$month,$next)=split(" ",cutspaces($next),2);
 *** list(
$day,$next)=split(" ",cutspaces($next),2);
 *** list(
$year_time,$filename)=split(" ",cutspaces($next),2);
 *** if(
$filename!="." && $filename!=".."){
 ** * ** if(
substr($permissions,0,1)=="d"){
 ** * * * ** 
$folders[]=$filename;
 ** * ** } else {
 ** * * * ** 
$files[]=$filename;}}}
sort($folders);
sort($files);

?> 
so this will simply "get" all the information WITHOUT being in any case interfered with some spaces, ... etc etc... It will even put files in a $files array and folders in a $folders array, and sort them, so you will be able of using all this later

and: the "folders" will NOT contain "." and ".."

so you can use all this to make a beautiful FTP interface... later on you could for example put permissions and etc etc in other arrays to use them in your result... cute....

Last edited by karinne; Apr 10th, 2007 at 15:49. Reason: Please use [php]...[/php] tags when displaying PHP code!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Apr 15th, 2007, 02:18
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 155
Thanks: 0
Thanked 4 Times in 4 Posts
Re: Help displaying multiple word documents

Just an observation, but if you wouldn't know where to start with the code for opening folders and displaying their contents maybe you should seek other alternatives, hire someone who does, or start reading up server side languages that are capable of doing this. A few places to start.

http://www.w3schools.com/php/default.asp
http://www.php.net/manual/en/function.fopen.php


Good Luck,
Scott
__________________
Web Design and Development
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
displaying, docs, folder, from, word

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Idiot question about documents kingwilliam Starting Out 2 May 23rd, 2008 16:10
Displaying multiple columns in a combo box 1840dsgn Web Page Design 1 Jan 7th, 2008 04:56
Reference Documents for web tools rivadex Starting Out 5 Aug 17th, 2007 14:51
Form to upload documents Sporky Web Page Design 2 Apr 19th, 2007 10:08
Uploading documents using asp and access therese Classic ASP 5 May 25th, 2004 05:02


All times are GMT. The time now is 14:17.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42