Open File in Browser Extension to Work with nested folders #1152
tibberous
started this conversation in
Extension Show and Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running XAMPP. I have my document root as my VSCode Project folder:
So in my httpd.conf I have the lines:
DocumentRoot "C:/Users/moren/source/repos/TrentonTompkins.com"
<Directory "C:/Users/moren/source/repos/TrentonTompkins.com">
So, if I go to the Browser, and open:
http://127.0.0.1/test/test/test.php
I get my PHP file to show up in the browser.
What I want is to be able to hit Shift+Q from the editor, while I'm in a php file, and have it open in the browser, even if it is in a nested folder.
So I got an extension:
Open PHP/HTML/JS In Browser
v2.5.0
PrimaFuture
If I set the url scheme to http://127.0.0.1/:
It opens:
file:///C:/Users/moren/source/repos/TrentonTompkins.com/test/test/test.php
If I set it to custom, and then set to Custom URL to Open it opens up:
http://127.0.0.1:80/${relativeDirnameDocumentRoot}/${fileBasename}
It opens up:
http://127.0.0.1/test.php
Which is almost exactly what I want.
Changed it to that:
http://127.0.0.1:80/${relativeFile}
Works perfect!
Beta Was this translation helpful? Give feedback.
All reactions