溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

PHP本地開發(fā)環(huán)境如何搭建

發(fā)布時間:2021-06-22 17:35:23 來源:億速云 閱讀:138 作者:Leah 欄目:編程語言

今天就跟大家聊聊有關(guān)PHP本地開發(fā)環(huán)境如何搭建,可能很多人都不太了解,為了讓大家更加了解,小編給大家總結(jié)了以下內(nèi)容,希望大家根據(jù)這篇文章可以有所收獲。

下載laragon
https://laragon.org/download/
安裝
一路next,
在laragon目錄下創(chuàng)建workspace目錄,以備vscode的工作區(qū)
安裝輔助軟件
navicat 
7z
升級插件
composer升級
git 升級
安裝php7.3
https://windows.php.net/download#php-7.3 (暫時百度云有)
解壓到E:\laragon\bin\php\
登錄mysql
默認mysql密碼
127.0.0.1
root 空密碼
設(shè)置mysql_mode
select @@GLOBAL.sql_mode 查詢sql_mode
SET GLOBAL sql_mode = 'NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; 在navicat里設(shè)置
安裝xdebug

官方檢測并安裝

https://forum.laragon.org/topic/264/tutorial-how-to-add-xdebug-to-laragon

啟動

php-快速設(shè)置里勾選xdebug
php-extension里勾選安裝的新版xdebug,無需勾選xdebug

配置php.ini

[XDebug]
xdebug.client_host=localhost
xdebug.client_port=9001
xdebug.remote_handler=dbgp
xdebug.mode=debug
xdebug.start_with_request=yes

配置launch.json

//注意步驟
//1.vscode里 設(shè)置 "php.validate.executablePath": "D:\\soft_work\\phpstudy_pro\\Extensions\\php\\php7.3.4nts\\php.exe",
// "php.validate.enable": true,
// "php.validate.run":"onSave",

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9001,
      "stopOnEntry":false,
      },
      {
        "name": "Launch currently open script",
        "type": "php",
        "request": "launch",
        "program": "${file}",
        "cwd": "${fileDirname}",
        "port": 9003
      },
  ]
}

看完上述內(nèi)容,你們對PHP本地開發(fā)環(huán)境如何搭建有進一步的了解嗎?如果還想了解更多知識或者相關(guān)內(nèi)容,請關(guān)注億速云行業(yè)資訊頻道,感謝大家的支持。

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

php
AI