sublime 怎麼搭建php

2022-10-26 10:00:23

sublime搭建php的方法:1、開啟sublime,點選「Ctrl+Shift+P」,再輸入install;2、設定SublimeLinter;3、修改路徑;4、設定php編譯系統;5、新增「{ "cmd":["php","$file"],"file_regex": "php$","selector":"source.php"}」即可。

php入門到就業線上直播課:進入學習
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API偵錯工具:

本教學操作環境:windows7系統、PHP8.1版、Dell G3電腦。

sublime 怎麼搭建php?

sublime3設定php環境

最後的演示效果:

1. 按照sublime3開始前的準備工作

Ctrl+Shift+P,再輸入install ,最後再輸入想要安裝的軟體 (輸入install會有幾十秒的延遲,請不要重複操作)

設定php環境,目前只需要設定兩個,首先設定SublimeLinter


先安裝好SublimeLinter ,再進入下面的步驟(如果不懂英語翻譯中文那麼就去翻譯)

Settings-User

直接拷貝下面的程式碼上去即可,修改一下3145行的路徑即可(記得全部拷貝!)

{
    "user": {
        "debug": false,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "csslint": {
                "@disable": false,
                "args": [],
                "errors": "",
                "excludes": [],
                "ignore": "",
                "warnings": ""
            },
            "php": {
                "@disable": false,
                "args": [],
                "excludes": []
            }
        },
        "mark_style": "outline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [],
            "windows": [
                "F:\\tomcat\\php\\php.exe"
            ]
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "sublimelinter": "save-only",
        "sublimelinter_executable_map": {
            "php": "F:\\tomcat\\php\\php.exe"
        },
        "syntax_map": {
            "coffeescript (gulpfile)": "coffeescript",
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "javascript (babel)": "javascript",
            "javascript (eslint)": "javascript",
            "javascript (gruntfile)": "javascript",
            "javascript (gulpfile)": "javascript",
            "javascript (postcss)": "javascript",
            "javascript (stylelint)": "javascript",
            "javascript (webpack)": "javascript",
            "json (babel)": "json",
            "json (bower)": "json",
            "json (composer)": "json",
            "json (eslint)": "json",
            "json (npm)": "json",
            "json (postcss)": "json",
            "json (settings)": "json",
            "json (stylelint)": "json",
            "json (sublime)": "json",
            "json (tern js)": "json",
            "magicpython": "python",
            "php": "html",
            "python django": "python",
            "pythonimproved": "python",
            "xml (config)": "xml",
            "xml (svg)": "xml",
            "yaml (circleci)": "yaml",
            "yaml (docker)": "yaml",
            "yaml (eslint)": "yaml",
            "yaml (lock)": "yaml",
            "yaml (procfile)": "yaml",
            "yaml (stylelint)": "yaml",
            "yaml (yarn)": "yaml"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}
登入後複製

好了,再說設定php 編譯系統的事情

一張圖闡釋設定系統環境

預設是有php的,不管你信不信,反正我是信了,來,說說設定php的編譯系統吧!!!

先把裡面的內容刪除

再加入以下程式碼:


{
    "cmd":["php","$file"],"file_regex":
    "php$","selector":"source.php"
}
登入後複製

重新命名為:php.sublime-build,最後儲存即可,這是我們就可以在編譯系統看見php了,這時我們再勾選上即可。

推薦學習:《》

以上就是sublime 怎麼搭建php的詳細內容,更多請關注TW511.COM其它相關文章!