Skip to content

Newbie with a VSCode question. #150431

Jan 31, 2025 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

problem usually comes down to two things:

  1. How the PHP Server extension “sees” your workspace versus an absolute path: Many PHP server extensions (for example, the popular “PHP Server” extension in VS Code) expect the document root to be specified relative to your current workspace folder. If you try to give it an absolute path (like C:/Users/frank/sites) but your VS Code workspace isn’t actually set to C:/Users/frank, then the extension won’t be able to find your files.

  2. Path formatting on Windows: In JSON you must either escape backslashes (i.e. use \) or use forward slashes. Not doing so can lead to “Invalid path” errors.

solution:

-- Open the Correct Workspace Folder:
If your file…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by m6vmo
Comment options

You must be logged in to vote
1 reply
@Hashir-Akbar
Comment options

Comment options

You must be logged in to vote
2 replies
@Hashir-Akbar
Comment options

@Hashir-Akbar
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants