![]() |
Forumhome error
Can someone please tell me what I am getting this error on my forumhome?
Warning: Unknown modifier 'k' in /home/bear/public_html/forum/index.php on line 414 Here is the chunk of code in question: PHP Code:
PHP Code:
Teoma/Ask Jeeves |
I'd just reupload an original copy of index.php to fix the problem
|
He wants to fix the problem though and keep his hacks.
|
Yes, I would like to keep the others hacks. I know the problem lies in that piece if code. I'm just not sure how to fix the one line though.
|
What does "k" mean?
|
I'm in the dark as much as you are on that one. ;)
|
Try using preg_quote on the useragent first.
|
How do you mean?
|
PHP Code:
|
Ok, I took out:
if (!(preg_match("/$webrobot/i", $loggedinrobots) )) $loggedinrobots .= $webrobot . ", "; and put in it's place: if (!(preg_match("/" . preg_quote($webrobot) . "/i", $loggedinrobots) )) $loggedinrobots .= $webrobot . ", "; Was the slash in the web robot name the problem then? And thank you very much for this. ;) |
It's because $webrobot had characters in it that were being interpreted as part of the regexp. :)
|
Thank you for the fix. That has been bugging me for a while. ;)
|
While you're at it, check out http://www.php.net/preg_quote and (IIRC) http://www.php.net/preg . Very useful stuff, that documentation ;)
|
Thank you. Now it makes a little more sense. It was the forward slash causing problems. One last question...what is the i for ("/i", ) in the line of code? I mean, what does it do exactly?
|
I have no idea. I know that some permutation of "siU" makes the regular expression not "greedy" but beyond that, no idea.
|
This is deep stuff. :) Good work filburt.
|
All times are GMT. The time now is 09:57 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|