我在单身人类中有以下方法
private function encode($inp) { if (is_array($inp) { return array_map('$this->encode',$inp); } else if is_scalar($inp) { return str_replace('%7E',rawurlencode($inp)); } else { return ''; } }
function encode($inp) { if (is_array($inp) { return array_map('encode',rawurlencode($inp)); } else { return ''; } }
PHP Warning: array_map(): The first
argument,‘$this->rfc_encode’,should
be either NULL or a valid callback@H_301_4@
从
PHP Manual on Callbacks:
A method of an instantiated object is passed as an array containing an object at index 0 and the method name at index 1. @H_301_4@
所以试试@H_301_4@
return array_map(array($this,'encode'),$inp);