samulwong631 2011-10-18 13:44:39 3215次浏览 5条回复 0 0 0

本人菜鸟,刚开始看教程 在操作过程中按课程把Controller或Views修改的时候,再刷新总是没变化的 要么就是把地址栏的controlID改一下大小写,要么是等很久(一般是第二天),才会显出修改的效果 请问是为什么呢?

  • 回复于 2011-10-18 14:43 举报

    不明白你是什么意思,不过你先在对应试图的方法里写个var_dump('hehe');看有效果吗?

  • 回复于 2011-10-18 14:59 举报

    比如我明明在views里把_form.php的相应代码从文本框改为下拉菜单

    <div class="row">
        <?php echo $form->labelEx($model,'type_id'); ?>
        <?php echo $form->dropDownList($model,'type_id', $model- >getTypeOptions()); ?>
        <?php echo $form->error($model,'type_id'); ?>
    </div>
    

    但是在页面怎么刷新都还是文本框,
    直到……一段时间过去。、
    再访问,才是下拉菜单。

  • 回复于 2011-10-18 15:15 举报

    应该是浏览器的缓存!

  • 回复于 2011-10-18 15:33 举报

    莫非是memcache的问题???
    php.ini里面有这么一段(安装memcache的时候google到加上去的)

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;
    
    max_execution_time = 600     ; Maximum execution time of each script, in seconds
    max_input_time = 600	; Maximum amount of time each script may spend parsing request data
    ;max_input_nesting_level = 64 ; Maximum input variable nesting level
    memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)
    
    
    apc.enabled = 1
    
    apc.shm_segments = 1
    
    apc.shm_size = 64
    
    apc.optimization = 0
    
    apc.num_files_hint = 1000
    
    apc.ttl = 0
    
    apc.gc_ttl = 3600
    
    apc.cache_by_default = On
    
    apc.slam_defense = 0
    
    apc.file_update_protection = 2
    
    apc.enable_cli = 0
    
    apc.stat=0
    
    
    [Memcache]
    memcache.allow_failover = 1
    memcache.max_failover_attempts= 20
    memcache.chunk_size = 8192
    memcache.default_port = 11211
    
    apc.rfc1867 = 1
    
    apc.max_file_size = 200M
    
  • 回复于 2011-10-18 15:40 举报

    找到办法了,就是把apache重启一下,就生效了。
    莫非是我的WAMP装得不好。

您需要登录后才可以回复。登录 | 立即注册