CI框架input get post (

xiaoxiao2021-02-28  28

$index='444?487d?[[^44]][\][]'; $count = preg_match_all('/^[^[]+/', $index, $matches); var_dump($count,$matches); //$count = preg_match_all('/[^\]*/', $index, $matches);//Message: preg_match_all(): Compilation failed: missing terminating ] for character class //$count = preg_match_all('/[^\\]*/', $index, $matches);//Message: preg_match_all(): Compilation failed: missing terminating ] for character class //$count = preg_match_all('/[^\\\\]*/', $index, $matches); //$count = preg_match_all('/[^\\\]*/', $index, $matches); $count = preg_match_all('/[\?\d]+/', $index, $matches); var_dump($count,$matches); $count = preg_match_all('/[^?\\d]+/', $index, $matches); var_dump($count,$matches); $index='[a][b][c]'; preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches); var_dump($count,$matches); echo '<hr>'; //http://www.ci.izanzan.cn/?stu[age][tom]=10&stu[age][lily]=29&stu[age][]=24&stu[age][]=22 var_dump($_GET);//array(1) { ["stu"]=> array(1) { ["age"]=> array(4) { ["tom"]=> string(2) "10" ["lily"]=> string(2) "29" [0]=> string(2) "24" [1]=> string(2) "22" } } } var_dump(2222,$this->input->get('[stu][age][tom]')); echo '<hr>'; var_dump(222,test());//testtestint(222) NULL function test(){ echo __METHOD__; echo __FUNCTION__; }
转载请注明原文地址: https://www.6miu.com/read-2621130.html

最新回复(0)