我想在 VS Code 中运行 PHP 和 MYSql,就像使用“xammp”运行一样。我遇到了一些要使用的扩展,例如 IIS-Express 和 vscode-database,但不知道如何配置并将它们链接在一起。哪些 PHP 适合,即线程安全或非线程安全。
PS:我完全是学习 PHP 和 VS Code 的新手,我想在我学习的每一种语言中都使用 VS Code :)
我想在 VS Code 中运行 PHP 和 MYSql,就像使用“xammp”运行一样。我遇到了一些要使用的扩展,例如 IIS-Express 和 vscode-database,但不知道如何配置并将它们链接在一起。哪些 PHP 适合,即线程安全或非线程安全。
PS:我完全是学习 PHP 和 VS Code 的新手,我想在我学习的每一种语言中都使用 VS Code :)
IIS Express is an extension that will basically run your project folder as a website. It's an extremely handy tool that I couldn't live without. Usage is simple, and noted below. I should also point out that IIS Express is only available for Windows and will not work on Linux or OSX.
More information can be found here.
After looking around, it seems vscode-database does not host an actual database, but rather, gives you a way to test your queries in the editor. The information page for vscode-database doesn't make that very clear, though. So for MySQL functionality, you may want to look at running MySQL in a "portable mode". Instructions for this can be found here.
After getting that setup, you would just connect to it in php like any other MySQL database.