dsf6778 2013-09-29 06:07
浏览 17

在我的网站上进行在线考试的行为[关闭]

I want to add a page in my website by which I want conduct online exams. I want that my page is activate for 3 hours only. After 3 hours the page will submit itself as happens in online exams. Can any one give me any script how to make my page time constraint?

  • 写回答

1条回答 默认 最新

  • douhai5835 2013-09-29 06:45
    关注
    $time = date('Y-m-d H:i:s');
    

    extract the hour from the date and do this

    if ($hour > 10800){ // 10800 which is equal to 3 hours in seconds.
    
        submit the exam
    
    }
    

    don't rely on javascript to set the time because the javascript may be disabled.

    评论

报告相同问题?