net里用反射才能做到的php代码片段

<?php
    class good{
        function show_detail(){
            return 'Fun !';
        }
    }
    $controller_name='good';
    $action_name='show_detail';
    $controller=new $controller_name();
    echo($controller->$action_name());
?>

posted @ 2010-04-27 13:40  liuwei0514  Views(130)  Comments(0)    收藏  举报