duanbaque4230 2010-07-05 18:00
浏览 26
已采纳

设计好的PHP测验脚本[关闭]

I'm developing a quiz module for a school with php and mysql. The requirements are simple:

1) There are 10 categories(subjects).

2) Select 8 random questions from each category and display them one by one.

3) Get the students input.

4) Calculate the result and display it.

Now, the problem that i face is how to make the script as efficient as possible. Efficient in the sense, make less database hits. I want to store the 80 answers for that particular user in a place and then update them all at once in the DB. I don't want to use cookies. In what way can i achieve that?

Are there any simple php quiz modules that i can refer?

Thanks :)

  • 写回答

5条回答 默认 最新

  • dongzine3782 2010-07-05 18:17
    关注

    You clearly want a fast cache layer. I suggest either memcached or APC for that purpose. Session data may also work.

    That said, you'd probably be better off using a full-stack PHP framework for this. A good one will manage caches for you. I suggest looking into symfony or CakePHP.

    Here's the real question, though: are you trying to address this problem up-front before you have established that there actually is a problem? This is a bad approach. Make sure you have a problem before you try to solve it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大