欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

昨晚忙到凌晨3点都没解决的问题,大侠,今天晚能不熬夜不?HELP!

程序员文章站 2022-06-05 16:34:47
...
想做一个在线答题系统,看看网上有个现成的,拿来试试,下载源码上传到sina云,为什么和原创的不一样呢?(答完题后没分数)
我的sina云地址:http://1.xyqcsmwly.sinaapp.com/quizphp/quiz.php

原创的演示地址:http://www.helloweba.com/demo/quiz/quiz.php

我的代码:
quiz.php
 $row['id'].'、'.$row['question'],		'answers' => $answers	);}$json = json_encode($arr);?>演示:如何使用jQuery+PHP+MySQL来实现一个在线测试项目



connect.php


data.php


回复讨论(解决方案)

data.php


quizs.js
(function($) {    $.fn.jquizzy = function(settings) {        var defaults = {            questions: null,            startImg: 'images/start.gif',            endText: '已结束!',            shortURL: null,            sendResultsURL: null,            resultComments: {                perfect: '你是爱因斯坦么?',                excellent: '非常优秀!',                good: '很好,发挥不错!',                average: '一般般了。',                bad: '太可怜了!',                poor: '好可怕啊!',                worst: '悲痛欲绝!'            }        };        var config = $.extend(defaults, settings);        if (config.questions === null) {            $(this).html('

Failed to parse questions.

'); return; } var superContainer = $(this), answers = [], introFob = ' ', exitFob = '
' + config.endText + '
请选择一个选项!
', contentFob = '', questionsIteratorIndex, answersIteratorIndex; superContainer.addClass('main-quiz-holder'); for (questionsIteratorIndex = 0; questionsIteratorIndex
' + (questionsIteratorIndex + 1) + '/' + config.questions.length + '
' + config.questions[questionsIteratorIndex].question + '
    '; for (answersIteratorIndex = 0; answersIteratorIndex ' + config.questions[questionsIteratorIndex].answers[answersIteratorIndex] + ''; } contentFob += '
'; } else { contentFob += ''; } contentFob += '