Sorry that this is more of a mysql question, but since most php
programmers use it a lot, i though i might find the answer without
subscribing to mysql list, here goes:
When i do a query from a big table using indexes,it takes for example 5
seconds. Now if i, after
some time repeat the query, the
Im using a regular expression, to get all urls from a file.
When using it on the webserver, it processes a 25kb html file
about 0.25 seconds (PIII 350, 128mb ram, linux 2.2.13-7mdk, php 3.0.12).
When i try the same on my machine (Celeron 300A, 192mb ram.), it does it
about 14-17 seconds, which is
Running php ver 3.0.12 and mysql ver 3.22.32 on a linux box.
Php installed as apache module
The script im running takes a long time to execute (20-40 minutes) and
includes
hundreds of selects and inserts into the database, and also
opening/closing lots of files.
And quite often, the script just st
ot;), which is not the
> same as chr(45).
> Hence, ereg_replace() fails and simply returns the original string, $text.
>
> -Original Message-
> From: Ando [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 7:08 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] e
m the manual for chr()
>
> Returns a one-character string containing the character specified by ascii.
>
> It replaces one (1) character, not a string
>
> -Original Message-
> From: Ando [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 28, 2002 6:59 AM
> To: [EMAIL PRO
Ok, what i wanna do is replace the codes in html with ascii equivalents:
$text= ereg_replace('([0-9]+);' , chr('\1') , $text);
But somehow it doesnt work, i have no idea why.
When i use
$text= ereg_replace('([0-9]+);' , '\1' , $text);
it replaces everything correctly
But
$text= ereg_replace
rote:
> the best you can do is:
>
> $a = "this has php in the string";
> if( ! ereg("php", $a ) )
> { print "a: not in string"; }
> $a = "this has in the string";
> if( ! ereg("php", $a ) )
> { print "b: not in string&qu
how would i build a regular expression in php that would match
everything but the given word. For example, match the string only if
there isnt a word 'php' in the string.
I understand i can list characters i dont want to see in the string:
[^php].
but this means there cant be any p or h in the str
Lets say i have a script that runs for a longer period of time, 1-10
minutes.
Id like the script to give output as to what it is doing while it runs,
but the problem is, that it
wont print output on runtime, but it will output everything at the same
time after it has completed the whole job.
Even
Just that i sent the message about 15 hours ago,
so i thought it didnt get through. Dunno why it took so long.
And thanks for help
Ando
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;
but i cannot think of a way to make it walk through the whole string, so
it
would find all the links, not just the first one.
Any ideas?
Ando
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nk);
but i cannot think of a way to make it walk through the whole string, so
it would find all the links, not just the first one.
Any ideas?
Ando
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nk);
but i cannot think of a way to make it walk through the whole string, so
it would find all the links, not just the first one.
Any ideas?
Ando
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
13 matches
Mail list logo