* 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,
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
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
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
:
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:
[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
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
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
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
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
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]
11 matches
Mail list logo