xjtlujoe
V2EX  ›  问与答

php 在 sublime 中的编译问题

  •  
  •   xjtlujoe · Jul 26, 2016 · 2020 views
    This topic created in 3627 days ago, the information mentioned may be changed or developed.

    php 在 sublime 中编译,不能自动识别,要选择 build system 中的 php 才行。

    c 的编译就可以自动识别, ctrl+b 即可。

    但是 php 就是不行,一定要选择一下 build system 。。求解。

    php.sublime-build 文件:

    { "cmd": ["D:\xampp\php\php.exe", "$file"], "file_regex": "php$", "selector":"source.php" }

    8 replies    2016-07-27 07:39:35 +08:00
    3A93EifxUzhBjhu6
        1
    3A93EifxUzhBjhu6  
       Jul 26, 2016
    php 你要在添加环境变量呀。。。 把 php 的路径丢上去
    cxbig
        2
    cxbig  
       Jul 26, 2016   ❤️ 1
    Windows 不是可以定义环境变量$PATH 么?把你的 xampp 的 php 和 mysql 的 bin 目录加进去,就可以直接使用了。
    Light3
        3
    Light3  
       Jul 26, 2016
    楼上已经告诉你了..
    laoyuan
        4
    laoyuan  
       Jul 26, 2016
    不用浏览器就用命令行,你们这样搞还真有点不习惯
    xjtlujoe
        5
    xjtlujoe  
    OP
       Jul 26, 2016
    @cxbig
    @echo111222 加了环境变量,但是我的意思是不能自动识别 php 文件, sublime 中的 build system 选择 auto 不行,选择新建的 php build 才行。 c 的话可以自动识别。。应该不是环境变量的问题。。。
    xjtlujoe
        6
    xjtlujoe  
    OP
       Jul 26, 2016
    @laoyuan 浏览器太慢,命令行没 sublime +插件效率高。
    cxbig
        7
    cxbig  
       Jul 26, 2016
    @xjtlujoe 加个 execution 插件吧。默认的好像是不行。
    xjtlujoe
        8
    xjtlujoe  
    OP
       Jul 27, 2016
    @cxbig 没搜到这个插件。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2790 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 15:33 · PVG 23:33 · LAX 08:33 · JFK 11:33
    ♥ Do have faith in what you're doing.