Quote:
Originally Posted by w4rkr4f7
PHP Code:
public SQLUserLoad(Handle:owner, Handle:hndl, const String:error[], any:client){ if(SQL_FetchRow(hndl))
{ new String:name[MAX_LINE_WIDTH]; GetClientName( client, name, sizeof(name)); ReplaceString(name, sizeof(name), "'", ""); ReplaceString(name, sizeof(name), "<?", ""); ReplaceString(name, sizeof(name), "?>", ""); ReplaceString(name, sizeof(name), "\"", ""); ReplaceString(name, sizeof(name), "<?PHP", ""); ReplaceString(name, sizeof(name), "<?php", "");
[SM] Native "GetClientName" reported: Client 5 is not connected
i want this error to not appear in logs
|
What's that good for anyway ? firstly, something like "PhP", or "pHp" would still work, you should really use the caseSensitive parameter of the ReplaceString function instead, unless you want to handle all 20 ways of how PHP can be opened.
and secondly... PHP Tags in Strings won't be parsed by the PHP compiler anyway, so this isn't needed at all, unless you hurry the string trough eval() which I don't recommend.
__________________