dongxuanchao1425 2015-09-30 13:46
浏览 183
已采纳

为什么要使用服务器端脚本语言? [关闭]

I'm middle of a confusion here. I'm learning PHP and studied about the advantages and disadvantages of it. Basically, I have to put PHP code inside HTML codes, thus when we load the .php file, it loads a HTML page. I'm unclear here! Why use a server-side scripting to output a HTML page, while I can simply create a .html file and open it?

  • 写回答

1条回答 默认 最新

  • dougan7657 2015-09-30 13:50
    关注

    Why use a server-side scripting to output a HTML page, while I can simply create a .html file and open it? You do not need PHP for that, you can always output a HTML page with .html extension.

    PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.PHP code can be simply mixed with HTML code, or it can be used in combination with various templating engines and web frameworks. PHP code is usually processed by a PHP interpreter, which is usually implemented as a web server's native module or a Common Gateway Interface (CGI) executable.

    However you NEED PHP for one too many reason, i.e. File Uploading/Database/Dynamic Websites and the list goes on and on, which obviously can't be done using HTML only.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制