php - Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' -
i have line in php:
function remove_dangerous_chars($src) { $list = array( '$', '\', '"', '\', '_request', '_get', '_post', '_cookie', '_files', '_server', '_env', 'globals', '_session', 'toupper' );
when run it, error:
parse error: syntax error unexpected t_constant_encapsed_string, expecting ')'
you need escape character, backslash, in array -
$list = array( '$', '\\', '"', '_request', '_get', '_post', '_cookie', '_files', '_server', '_env', 'globals', '_session', 'toupper' );
and need backslash once in array.
Comments
Post a Comment