Skip to content

Instantly share code, notes, and snippets.

@marcus-at-localhost
Last active October 12, 2015 11:55
Show Gist options
  • Select an option

  • Save marcus-at-localhost/a53179c878983bd0a78a to your computer and use it in GitHub Desktop.

Select an option

Save marcus-at-localhost/a53179c878983bd0a78a to your computer and use it in GitHub Desktop.
Put this into windows `shell:sendto` and you can open a file in your local webroot (in my case `E:\WEB`) with starting php's build in webserver first at http://localhost:8000/ and then view the file. I use this to quickly open a project specific [mdwiki](http://dynalon.github.io/mdwiki/#!index.md).
@echo off
set input=%1
Echo.Input was - %input%
set converted=%input:E:\WEB\=http://localhost:8000/%
set converted=%converted:\=/%
echo.Converted to - %converted%
start php -S localhost:8000 -t "E:\WEB\"
start %converted%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment