Re: [PHP] Re: reading/parsing file names

2003-10-26 Thread Curt Zirzow
* Thus wrote Evan Nemerson ([EMAIL PROTECTED]): [tadpole tadpole]$ php -q ./bench.php Averages: substr: 3.5071199059486 pcre: 4.2237901210785 Averages: substr: 5.1445327162743 pcre: 5.6803694009781 posix: 8.0486606121063 Interesing that my results of substr vs. pcre came in closer,

[PHP] Re: reading/parsing file names

2003-10-25 Thread koly
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Koly) wrote: my problem: I've got a list of files in a directory, and I'd like to get a only of filenames that end in .jpg, however, exlude the files that end in .thumb.jpg ex: file.php index.htm photo.jpg photo.thumb.jpg etc

Re: [PHP] Re: reading/parsing file names

2003-10-25 Thread John Nichel
koly wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Koly) wrote: my problem: I've got a list of files in a directory, and I'd like to get a only of filenames that end in .jpg, however, exlude the files that end in .thumb.jpg ex: file.php index.htm photo.jpg photo.thumb.jpg etc how

Re: [PHP] Re: reading/parsing file names

2003-10-25 Thread Eugene Lee
On Sat, Oct 25, 2003 at 04:16:49PM -0700, koly wrote: : : [EMAIL PROTECTED] (Koly) wrote: : : I've got a list of files in a directory, and I'd like to get a only of : filenames that end in .jpg, however, exlude the files that end in : .thumb.jpg : : ex: : file.php : index.htm :

Re: [PHP] Re: reading/parsing file names

2003-10-25 Thread Evan Nemerson
A little something I whipped up to avoid my zoology homework (I /really/ don't care that the damn sperm of nematodes are unusual because they lack a flagellum and acrosome). Conclusion: substr is faster than preg_match [tadpole tadpole]$ php -q ./bench.php substr: 3.6424000263214 PCRE:

[PHP] Re: Reading a file from another server

2003-07-25 Thread Comex
[EMAIL PROTECTED] Thomas: Hi Everyone. I'm having problems creating code to read a file from another server. 1. Is this even possible? with a secure server aswell? 2. I have tried using fopen()but this always gives me an error: Warning: stat failed for

[PHP] Re: reading a file into variable for using in a javascript

2003-06-10 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hi all, I am reading the content of a text file into a variable to be used in a javascript. I am reworking some code that was originally done using ColdFusion and the jsStringFormat(var) function. What is the PHP equivalent string

[PHP] Re: reading a file into variable for using in a javascript

2003-06-09 Thread Madhusudhana Rao Sunkara
you could try using file() or readfile(). while file reads the content of the file in to an array, readfile reads a file and writes it to the output buffer. - Madhu Charles Kline wrote: Hi all, I am reading the content of a text file into a variable to be used in a javascript. I am reworking

[PHP] Re: Reading Text file by line

2003-02-24 Thread Mathieu Dumoulin
Depends on what OS you are: Windows: Search for \n\r (or chr(13) . chr(10)) Unix/linux: Search only for \n (or chr(13)) MAC: Search for only \r (or chr(10)) If you want to READ line by line instead of Exploding your complete content, use this: $myLine = fgets($myFilePointer, 1048576) The 2

[PHP] Re: Reading A file

2002-03-06 Thread Julio Nobrega Trabalhando
If it's a file ending in .txt, you don't need PHP at all to make visual on the web, most browsers will just display it on the screen. Just link to it. But, if you want to echo it inside html, do: ?php $filename = 'path/to/file.txt'; $fd = fopen($filename,'r'); // might be 'rb', check manual

[PHP] Re: reading a file into a string problem : $string = join ('', file (/location/$dynamic.iq))

2001-12-19 Thread Lee Philip Reilly
Okay, I see the problem. No reply necessary. Cheers, Lee -- 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]