Coder Social home page Coder Social logo

vscode-phpserver's Introduction

Buy Me a Coffee at ko-fi.com

Host / serve current workspace (or subfolder) with PHP.

demo

Getting started

There are multiple ways of running PHP server:

  • CTRL + SHIFT + P and searching for PHP Server: Serve project command
  • Clicking on vscode's editor button (icon on the top-right corner)
  • Right-clicking on vscode's editor when a .php or an .html is open.

To stop the server, the PHP Server: Stop project command can be executed likewise.

Commands

All commands can be executed by pressing CTRL + SHIFT + P and typing the name of the command.

Command Notes
PHP Server: Serve project
PHP Server: Stop project
PHP Server: Reload server Stops the running server and starts it again.
PHP Server: Open file in browser Quickly opens the URL of the active file in the browser. If the server is not running, this command will fail.

Settings

Setting Default Notes
phpserver.autoOpenOnReload true Enable/disable automatic opening of server's URL in the browser after server has been reloaded.
phpserver.browser null App used to open the server URL. If empty, it will use the default browser.
You can put any browser name here as long as it's installed in your machine (e.g. google-chrome, firefox, chromium-browser...)
phpserver.ip localhost Server's ip/hostname (e.g. localhost, 0.0.0.0...)
phpserver.phpConfigPath null Path to php.ini file. If empty, the extension uses the default path.
phpserver.phpPath null Path to PHP executable. If empty, the extension will try to get the path from the $PATH environment variable.
phpserver.port 3000 Server's port number.
phpserver.relativePath "." Path relative to project. This is useful when you want to serve a different folder than the one from current workspace.
phpserver.router null Path to custom router script that will be used by PHP server. Example.
If a custom router script is used on a Windows machine, there will be no console output unless a logger like this is included in the script.

Requirements

  • PHP needs to be installed in order to be able to use this extension.

Author

Brais Piñeiro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.