>  기사  >  백엔드 개발  >  phpStudy中起用lua脚本_PHP教程

phpStudy中起用lua脚本_PHP教程

WBOY
WBOY원래의
2016-07-13 17:18:381238검색

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模块的配置完毕。




www.bkjia.comtruehttp://www.bkjia.com/PHPjc/621634.htmlTechArticlephpStudy集成了多种web服务的综合配置,如经典的apachemysql、nginxmysql等,在使用apachemysql时,希望能够使用lua脚本,于是利用配置选项,启用...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.