From 80cff9b654e111a92b344fd3bf6c0fcb87ea6d1d Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Tue, 19 Mar 2019 22:41:24 +0530 Subject: [PATCH] [fix] typo --- php.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/php.js b/php.js index 069e6c9..1cc9873 100644 --- a/php.js +++ b/php.js @@ -5,14 +5,14 @@ const child = require('child_process'); const path = require('path'); const fs = require('fs'); -function runPHP(req, res, { cgi, ini, public }) { +function runPHP(req, res, { cgi, ini, public: publicDir }) { const parts = url.parse(req.url); const query = parts.query; - let file = path.join(public, parts.pathname); + let file = path.join(publicDir, parts.pathname); if (!fs.existsSync(file)) { - file = path.join(public, "index.php"); + file = path.join(publicDir, "index.php"); } else if (fs.statSync(file).isDirectory()) { file = path.join(file, "index.php"); }