1

这是表格:

<?php echo form_open('locker_settingstwo/processform', array('class' => 'form-horizontal')); ?>
        <div class = "lockersettingstwodiv"> 
            <h2><?php echo $this->session->userdata('labelname'); ?></h2>
            <p> Control who can view/ReGemz the collection in this locker </p>
            <input type = "text" name = "testing" value = "" />
            <input type="radio" name="permission" value="1" /> Public - Others can view/edit this locker<br/>
            <input type="radio" name="permission" value="2" /> Me Only - Only you can view/edit this locker<br/>
            <input type="radio" name="permission" value="custom" /> Custom - Locked to everyone, meaning only friends I choose can view/edit this locker<br/>
        </div>
            <input type="submit" name = "Next" value="Next" class="btn btn-large btn-primary" style="margin-left: 0px; margin-top: 14px" />
            <input type="submit" name = "Cancel" value="Cancel" class="btn btn-large btn-primary" style="margin-left: 0px; margin-top: 14px" />
    <?php echo form_close(); ?>  

现在当我打印 $_SERVER['REQUEST_METHOD'] 时,它说的是 GET,而不是 POST……这是为什么呢?

这是表单发送到的控制器方法:

function processform() 
{
    echo $_SERVER['REQUEST_METHOD'];
} 
4

1 回答 1

1

您的主机是如何设置的?有时,当您使用 FastCGI SAPI 时,$_GET由于重定向/转发,POST 属性会被转换为超全局属性。

您使用的是什么 SAPI?

于 2012-07-19T03:35:07.270 回答