diff --git a/lib/connect-php.js b/lib/connect-php.js
index <HASH>..<HASH> 100644
--- a/lib/connect-php.js
+++ b/lib/connect-php.js
@@ -19,7 +19,7 @@ module.exports = function phpMiddleware(directory) {
     }
     return function(req, res, next) {
         if(req.url.endsWith('.php')) {
-            exec('php ' + directory + req.url, function callback(error, stdout, stderr){
+            exec('php "' + directory + req.url + '"', function callback(error, stdout, stderr){
                 if(error) {
                     console.error(stderr);
                 }
Update connect-php.js

Change made to accommodate directory paths with spaces.