Re: [PHP] How to get php to accept spaces in a file name?
Thanks Bogdan, >From: Bogdan Stancescu <[EMAIL PROTECTED]> >To: Kevin Garrett <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: [PHP] How to get php to accept spaces in a file name? >Date: Tue, 22 Jan 2002 15:30:39 +0200 > >rawurlencode() is the answer to your question. > >Bogdan > >Kevin Garrett wrote: > > > Hi guys, > > > > I've an index script which views the contents of a directory on a unix > > server. This unix server has also got file with windows naming >convesion, > > which makes a file with spaces look like this "/this\ is\ an\ example/". > > The file name itself appears fine but there is also a link to the file >which > > would only see the "/this\ " part of the file. > > > > My question is, does anybody know how to get php to accept spaces in a >file > > name? > > > > Thanks > > Kev > > > > _ > > Join the worlds largest e-mail service with MSN Hotmail. > > http://www.hotmail.com > > > > -- > > 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] > > _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- 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] How to get php to accept spaces in a file name?
Hi guys, I've an index script which views the contents of a directory on a unix server. This unix server has also got file with windows naming convesion, which makes a file with spaces look like this "/this\ is\ an\ example/". The file name itself appears fine but there is also a link to the file which would only see the "/this\ " part of the file. My question is, does anybody know how to get php to accept spaces in a file name? Thanks Kev _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- 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] How to display one line from a file rather than the whole lot
Hi guys, I'm looking to edit this to just return one particular line rather than the whole file: http://www.php.net'); while (list ($line_num, $line) = each ($fcontents)) { echo "Line $line_num: " . htmlspecialchars ($line) . "\n"; } ?> Can anybody help me? Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Please Help! Sorting the results of directory indexing
Hi all, I have a script that lists directory contents but I'm trying to put the results in reverse order. I've tried the arsort & array reverse but have so far been unable to get them working, can somebody please help me! Here's a look at my script: \n"); // get each entry within the directory & return to user with the link $myDir = dir("."); while($FileName = $myDir->read()) { if ($FileName != "." && $FileName != ".." && eregi (".*\.htm",$FileName)){ print("$entryName \n"); } } // close directory $myDir->close(); print("\n"); ?> _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Read from files & display selected lines under the file name while indexing
Hi all. I have a script that indexes html files within a directory. The files are created using the date & time stamps by another script & what I'm looking to do is somehow create a preview panel for the message which would read the 2nd to the 4th line & disply it under the filename so as to provide a better description. I'd really appreciate somebodies help with this & if you need more information please let me know My index script looks like the following: \n"); $thisdir = dir("."); while($filename = $myDirectory->read()) { if ($filename != "." && $filename != ".." && eregi (".*\.htm",$filename)){ print("$filename \n"); } } $thisdir->close(); print("\n"); ?> Thanks Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Creating a new file & saving it with date & time name
Hi all, I'm looking to find out how to create a file using php & using the date & time as it's filename. Can somebody please help me? Kevin _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Using PHP for directory indexing
Wow that was a quick response...Thanks alot! That those the listing part of my problem but is there a way of only showing a certain type of file such as only HTML? & is there a way of somehow automatically making a link to access those pages? >From: "Oosten, Sjoerd van" <[EMAIL PROTECTED]> >To: 'Kevin Garrett' <[EMAIL PROTECTED]>, "'[EMAIL PROTECTED]'" ><[EMAIL PROTECTED]> >Subject: RE: [PHP] Using PHP for directory indexing >Date: Mon, 12 Nov 2001 14:15:14 +0100 > > // print the current directory in unordered list > print("\n"); > > // open directory > $myDirectory = dir("."); > > // get each entry > while($entryName = $myDirectory->read()) > { > print("$entryName \n"); > } > > // close directory > $myDirectory->close(); > > print("\n"); >?> > > >Sjoerd van Oosten >Digitaal vormgever [EMAIL PROTECTED] >Datamex E-sites B.V. >http://www.esites.nl >Minervum 7368 Telefoon: (076) 5 730 730 >4817 ZH BREDA Telefax: (076) 5 877 757 >___ > > >-Oorspronkelijk bericht- >Van: Kevin Garrett [mailto:[EMAIL PROTECTED]] >Verzonden: maandag 12 november 2001 14:08 >Aan: [EMAIL PROTECTED] >Onderwerp: [PHP] Using PHP for directory indexing > > >Hi All, > > I am wondering if anyone can help me with this. I want people >accessing my >site to see a list of HTML reports but I don't want to turn on Directory >indexing on my Apache webserver, seeing as the directory path is present. >What I'm looking to do, is to write a basic php script which will read the >files in a certain directory & create links to be presented to the user. >Has anyone ever done this before? Can someone give me an example or a >headstart on this. > >Thanks in advance >Kev > >_ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > >-- >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] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] Using PHP for directory indexing
Hi All, I am wondering if anyone can help me with this. I want people accessing my site to see a list of HTML reports but I don't want to turn on Directory indexing on my Apache webserver, seeing as the directory path is present. What I'm looking to do, is to write a basic php script which will read the files in a certain directory & create links to be presented to the user. Has anyone ever done this before? Can someone give me an example or a headstart on this. Thanks in advance Kev _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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]