ホームページ > バックエンド開発 > PHPの問題 > SublimeでPHPを構築する方法

SublimeでPHPを構築する方法

藏色散人
リリース: 2023-03-17 09:30:01
オリジナル
2708 人が閲覧しました

sublime搭建php的方法:1、打开sublime,点击“Ctrl+Shift+P”,再输入install;2、配置SublimeLinter;3、修改路径;4、配置php编译系统;5、添加“{ "cmd":["php","$file"],"file_regex": "php$","selector":"source.php"}”即可。

SublimeでPHPを構築する方法

本教程操作环境:windows7系统、PHP8.1版、Dell G3电脑。

sublime 怎么搭建php?

sublime3配置php环境

最后的演示效果:

 

 

1. 按照sublime3开始前的准备工作

Ctrl+Shift+P,再输入install ,最后再输入想要安装的软件 (输入install会有几十秒的延迟,请不要重复操作)

 

 配置php环境,目前只需要配置两个,首先配置SublimeLinter

 


先安装好SublimeLinter ,再进入下面的步骤(如果不懂英语翻译中文那么就去翻译)

 

 Settings-User

 

 

直接拷贝下面的代码上去即可,修改一下3145行的路径即可(记得全部拷贝!)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

{

    "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的编译系统吧!!!

先把里面的内容删除

再加入以下代码:


1

2

3

4

{

    "cmd":["php","$file"],"file_regex":

    "php$","selector":"source.php"

}

ログイン後にコピー

 

 

重命名为:php.sublime-build,最后保存即可,这是我们就可以在编译系统看见php了,这时我们再勾选上即可。

推荐学习:《PHP视频教程

以上がSublimeでPHPを構築する方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

関連ラベル:
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート