• <tfoot id='JluYu'></tfoot>
    <i id='JluYu'><tr id='JluYu'><dt id='JluYu'><q id='JluYu'><span id='JluYu'><b id='JluYu'><form id='JluYu'><ins id='JluYu'></ins><ul id='JluYu'></ul><sub id='JluYu'></sub></form><legend id='JluYu'></legend><bdo id='JluYu'><pre id='JluYu'><center id='JluYu'></center></pre></bdo></b><th id='JluYu'></th></span></q></dt></tr></i><div id='JluYu'><tfoot id='JluYu'></tfoot><dl id='JluYu'><fieldset id='JluYu'></fieldset></dl></div>
  • <small id='JluYu'></small><noframes id='JluYu'>

  • <legend id='JluYu'><style id='JluYu'><dir id='JluYu'><q id='JluYu'></q></dir></style></legend>
    • <bdo id='JluYu'></bdo><ul id='JluYu'></ul>

        在 Windows 命令提示符 (cmd) 中运行 .php 文件

        时间:2023-09-25

              <bdo id='AoOsv'></bdo><ul id='AoOsv'></ul>

                <tbody id='AoOsv'></tbody>
              • <i id='AoOsv'><tr id='AoOsv'><dt id='AoOsv'><q id='AoOsv'><span id='AoOsv'><b id='AoOsv'><form id='AoOsv'><ins id='AoOsv'></ins><ul id='AoOsv'></ul><sub id='AoOsv'></sub></form><legend id='AoOsv'></legend><bdo id='AoOsv'><pre id='AoOsv'><center id='AoOsv'></center></pre></bdo></b><th id='AoOsv'></th></span></q></dt></tr></i><div id='AoOsv'><tfoot id='AoOsv'></tfoot><dl id='AoOsv'><fieldset id='AoOsv'></fieldset></dl></div>
                <tfoot id='AoOsv'></tfoot>
                • <small id='AoOsv'></small><noframes id='AoOsv'>

                • <legend id='AoOsv'><style id='AoOsv'><dir id='AoOsv'><q id='AoOsv'></q></dir></style></legend>
                  本文介绍了在 Windows 命令提示符 (cmd) 中运行 .php 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想在 windows cmd 中运行一个 .php 文件.我跟着这个(建议)php 不被识别为内部命令(在 Windows 中)

                  I want to run a .php file in windows cmd. I followed this (suggestion) php is not recognized as an internal command (in Windows)

                  但是没有用.

                  我试过这个命令提示符:
                  C:Windowssystem32>cd 我的文件夹

                  I tried this command prompt:
                  C:Windowssystem32> cd myfolder

                  myfolder 中,我做了如下操作:
                  <代码>C:..myfolder>php文件.php
                  但我收到错误消息php 未被识别为内部或外部"

                  And within myfolder I did as follows:
                  C:..myfolder> php file.php
                  but I get an error "php is not recognized as internal or external"

                  但是当我尝试不使用这样的 php 命令时;
                  C:..myfolder>file.php
                  它只是在记事本中打开,但我想在 cmd 中运行它.
                  我该怎么做?

                  But when I try without php command like this;
                  C:..myfolder> file.php
                  it just opens in notepad, yet I want to run it in cmd.
                  How can I do it?

                  推荐答案

                  如果运行的是 Windows 10:

                  1. 打开开始菜单
                  2. 输入路径
                  3. 点击编辑系统环境变量(通常,它是搜索结果的顶部)并继续下面的步骤6.

                  如果在旧版 Windows 上:

                  1. 显示桌面.

                  1. Show Desktop.

                  右键单击桌面上的我的电脑快捷方式.

                  Right Click My Computer shortcut in the desktop.

                  点击属性.

                  Click Properties.

                  您应该会看到控制面板的一部分 - 控制面板系统和安全系统.

                  You should see a section of control Panel - Control PanelSystem and SecuritySystem.

                  点击左侧菜单上的高级系统设置.

                  Click Advanced System Settings on the Left menu.

                  点击系统属性窗口底部的环境变量.

                  Click Enviornment Variables towards the bottom of the System Properties window.

                  在用户变量列表中选择PATH.

                  Select PATH in the user variables list.

                  将您的 PHP 路径 (C:myfolderphp) 附加到您的 PATH 变量中,用分号与现有字符串分隔.

                  Append your PHP Path (C:myfolderphp) to your PATH variable, separated from the already existing string by a semi colon.

                  点击确定

                  打开你的cmd"

                  输入PATH,按回车

                  确保您在列表中看到您的 PHP 文件夹.

                  Make sure that you see your PHP folder among the list.

                  应该可以.

                  注意:确保您的 PHP 文件夹中有 php.exe.它应该具有文件类型 CLI.如果您没有 php.exe,请继续检查安装指南 - http://www.php.net/manual/en/install.windows.manual.php - 并从那里下载安装文件.

                  Note: Make sure that your PHP folder has the php.exe. It should have the file type CLI. If you do not have the php.exe, go ahead and check the installation guidelines at - http://www.php.net/manual/en/install.windows.manual.php - and download the installation file from there.

                  这篇关于在 Windows 命令提示符 (cmd) 中运行 .php 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PHP UTF-8 转 Windows 命令行编码 下一篇:ExtJS 4.2 - “同步 XMLHttpRequest"的可能原因;警

                  相关文章

                  最新文章

                    <tfoot id='d9A4u'></tfoot>
                  1. <legend id='d9A4u'><style id='d9A4u'><dir id='d9A4u'><q id='d9A4u'></q></dir></style></legend>

                  2. <small id='d9A4u'></small><noframes id='d9A4u'>

                      <i id='d9A4u'><tr id='d9A4u'><dt id='d9A4u'><q id='d9A4u'><span id='d9A4u'><b id='d9A4u'><form id='d9A4u'><ins id='d9A4u'></ins><ul id='d9A4u'></ul><sub id='d9A4u'></sub></form><legend id='d9A4u'></legend><bdo id='d9A4u'><pre id='d9A4u'><center id='d9A4u'></center></pre></bdo></b><th id='d9A4u'></th></span></q></dt></tr></i><div id='d9A4u'><tfoot id='d9A4u'></tfoot><dl id='d9A4u'><fieldset id='d9A4u'></fieldset></dl></div>
                        <bdo id='d9A4u'></bdo><ul id='d9A4u'></ul>