Home >php教程 >php手册 >phpStudy中起用lua脚本

phpStudy中起用lua脚本

WBOY
WBOYOriginal
2016-06-13 10:19:062380browse

phpStudy集成了多种web服务的综合配置,如经典的apache+mysql、nginx+mysql等,在使用apache+mysql时,希望能够使用lua脚本,于是利用配置选项,启用lua模块,如下图


但是经过这样的配置后,再重启apache服务时,却无法正常使用lua脚本。lua测试代码如下

require "apache2"

function handle(r)
  r.content_type = "text/html"
  r:write "Hello World from <strong>mod_lua</strong>."
  return apache2.OK
end
可是在浏览器打开时,却是得到了这样的结果,见下图

vcWxvsO709Cxu9a00NCjrLb4yse1sbPJwcvG1c2otcTOxLG+tsHIoc/Uyr61vcHL5K/AwMb31tCho8TH1eLKx8qyw7TOyszixNijvzwvcD4KPHA+vq25/bLp1dKjrL+0tb3By9K7xqrOxNXC1tDLtbW9YXBhY2hl1tDG9NPDbHVhxKO/6bXEzsTVwqGjzsTVwtbQzOG1vdTaYXBhY2hlMi400tTJz7XEsOaxvtbQ0tG+rcTa1sPBy2x1YbXExKO/6aOsztLDx9a70OjSqr340NDSu9CpxeTWw77Nv8nS1MHLoaPIu7rzsunBy8/CcGhwU3R1ZHmwstewyrHL+bT4tcRhcGFjaGXKxzIuNLDmsb61xKOsy/nS1MTa1sPBy2x1YcSjv+mho8/Cw+bKx8Xk1sOyvdbooaM8L3A+CjxwPjEu1NpwaHBTdHVkeVxBcGFjaGVcY29uZs/C1dK1vWh0dHBkLmNvbmbF5NbDtbWjrL2rTG9hZE1vZHVsZSBsdWFfbW9kdWxlIG1vZHVsZXMvbW9kX2x1YS5zb8eww+a1xCO6xciltfSjqCO6xcrH16LKzbHqvMejqaGjPC9wPgo8cD4yLtTaxeTWw7XE1+6688PmzO3Jz2x1YcSjv+m0psDtz+5BZGRIYW5kbGVyIGx1YS1zY3JpcHQgLmx1YaGjPC9wPgo8cD4zLrGjtObF5NbDPC9wPgo8cD40LtTacGhwc3R1ZHnW0NbYxvS3/s7xoaM8L3A+CjxwPjUu1Nm0zrTyv6poZWxsby5sdWGy4srU0rOho9TL0NDV/bOjo6y94bn7yOfPws28oaM8L3A+CjxwPjxpbWcgc3JjPQ=="http://www.Bkjia.com/uploadfile/Collfiles/20131209/20131209104641156.jpg" alt="">

至此,phpstudy起用lua模块的配置完毕。




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn