[Vuejs]-Run php files in a vue.js

0👍

Because localhost:8080 runs no PHP server you must use a server which is running PHP, either on your local machine (e.g. MAMP) or on your public server. If the project resides under the folder my_project and the PHP file under the subfolder static, the proxyTable must look like:

 proxyTable: {
          '/static/dserver.php': {
             target: 'http://localhost/my_project',
             changeOrigin: true
           }

which resolves in http://localhost/my_project/static/dserver.php .

Leave a comment