douxie7738 2013-12-12 14:16 采纳率: 0%
浏览 24

用Jquery调用PHP [关闭]

I have a jquery file in which i have the following code:

var QUESTIONS = ["Q11", "Q22", "Q33", "Q44", "Q55"];
var ANSWERS = [["Si", "No"], ["Si", "No"], ["Si", "No"], ["Si", "No"], ["Si", "No"]];

Now i want to load the questions and answers from the PHP.

  • 写回答

3条回答 默认 最新

  • doushi1996 2013-12-12 14:22
    关注

    Trolling ahead!

    If you want to load javascript into the PHP Userspace, you will need to lex and parse it, then read it into your own PHP userspace.

    1. Create a javascript lexer to read the content of the file
    2. From the token list, create a parser that will validate and construct and complex expression tree
    3. Then you can analyse the expression tree and extract the different values into model classes you will have created.

    Or, you could simply, just copy the content over to PHP and use it normally!

    评论

报告相同问题?

悬赏问题

  • ¥15 Python报错怎么解决
  • ¥15 simulink如何调用DLL文件
  • ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离
  • ¥30 线性代数的问题,我真的忘了线代的知识了
  • ¥15 有谁能够把华为matebook e 高通骁龙850刷成安卓系统,或者安装安卓系统
  • ¥188 需要修改一个工具,懂得汇编的人来。
  • ¥15 livecharts wpf piechart 属性
  • ¥20 数学建模,尽量用matlab回答,论文格式
  • ¥15 昨天挂载了一下u盘,然后拔了
  • ¥30 win from 窗口最大最小化,控件放大缩小,闪烁问题