|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-18 06:31 UTC] nick at netdupe dot com
If you accidently put something like the following in
str_replace the server goes nuts and does not return
any information.
<?
$code = "hello";
$string = "Hello, Bob how are you";
$text = str_replace("$code", "hey", $string);
?>
This only occurs when you put $code in quotation marks.
Shouldnt it come up? I did this the server load went
from 0.05 to 23.4
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
ok this is the code i used it with: <? $file = file("smillies.db"); foreach($file as $value){ list($rand,$code,$image) = explode("|<|", $value); $code = stripslashes($code); $fusnewsm = str_replace("$code","<img src=\"http://images.devdino.com/smillies/$image\" border=\"0\">",$fusnewsm ); } ?> You will need smilies.db you can get it from www.devdino.com/smillies.db.