デフォルトの実行構成の定義

関連項目

実行構成は、もっとも頻繁に使用される PHP 開発ユースケースに対応しています。実行構成とは、PHP プロジェクトの実行用に保存された設定です。1 つのプロジェクトに対して複数の構成を定義し、その構成間で切り替えることができます。実行構成は、実行およびデバッグの両方に適用されます。

注: プロジェクトの作成中に、デフォルトの実行構成が定義されます。追加の実行構成を定義するには、プロジェクト設定をカスタマイズします。

プロジェクトに対してデフォルトの実行構成を設定するには、「実行方法」ドロップダウンリストから適切なオプションを選択します。次のオプションがあります。

ローカル Web サイト

「実行方法」ドロップダウンリストから「ローカル Web サイト」を選択します。以後の手順はプロジェクトの種類によって異なります。

開発済みソースを使用しないプロジェクト

  1. 「プロジェクト URL」フィールドで、自動的に生成された URL アドレスを確認します。Apache HTTP サーバーがデフォルトの 80 番ポートで待機していることを確認します。していない場合、次のようにポート番号を明示的に指定します。
    localhost:<ポート番号>
                    
  2. プロジェクトのソースファイルに別のストレージを設定するには、「ファイルをソースフォルダから別の場所にコピー」チェックボックスを選択します。
  3. 「フォルダにコピー」フィールドでストレージの場所を指定します。

開発済みソースを使用するプロジェクト

  1. 「ファイルをソースフォルダから別の場所にコピー」チェックボックスを選択します。
  2. 「フォルダにコピー」フィールドで、ソースファイルを保存する、Web サーバー上のフォルダを指定します。必要に応じて「参照」ボタンを使用します。
    フィールドにはデフォルトで、<ドキュメントルート>\<新規 PHP プロジェクト> というパスが指定されています。
    ドキュメントルートは、Web サーバーがブラウザで開くファイルを探すフォルダです。ドキュメントルートは、Web サーバーの構成ファイルで指定されています。
    The wizard detects the and provides the path to the default location of the htdocs folder. Apache サーバーまたは AMP パッケージのインストール中にデフォルトの設定を受け入れた場合は、ドロップダウンリストから適切なパスを選択します。
  3. 「プロジェクト URL」フィールドで、自動的に生成された URL アドレスを確認します。Apache HTTP サーバーがデフォルトの 80 番ポートで待機していることを確認します。していない場合、次のようにポート番号を明示的に指定します。
    localhost:<ポート番号>
                    

If you are using Remote Debugging or Symbolic Links, click Advanced and set up path mapping. See Path Mapping.

リモート Web サイト

  1. From Run As dropdown list, choose Remote Web Site (FTP/SFTP).
  2. From the Remote Connection dropdown list, choose the relevant connection profile.
  3. To create, update, or remove an (S)FTP Connection profile, click Manage. The Manage Remote Connections dialog box opens with the fields showing the current (S)FTP connection profile settings. (If there are no existing connection profiles, the Create New Connection dialog opens automatically when you click Manage.)
  4. To create a new (S)FTP connection profile, click Add. 「新規接続を作成」ダイアログが開きます。
  5. 「接続名」フィールドで、新規接続の名前を入力し、「了解」をクリックします。「リモート接続を管理」ダイアログが表示され、「接続名」表示フィールドに新規接続名が表示されます。
  6. From the Type dropdown list, choose FTP or SFTP.
  7. In the Host Name field, enter the (S)FTP Server name as it is written in the (S)FTP account creation confirmation message.
  8. In the Port field, specify 21 for an FTP and 22 for an SFTP connection.
  9. In the User Name field, enter your FTP Username as it is written in the (S)FTP account creation confirmation message.
  10. 「パスワード」フィールドに入力します。
  11. In the Initial Directory field, enter the name of your account directory on the (S)FTP server and click OK. 「実行構成」パネルに戻ります。
  12. 「アップロードディレクトリ」フィールドで、初期ディレクトリのサブフォルダの名前を入力します。ここにソースファイルがアップロードされます。このフィールドの下のプロンプトに FTP ホストの URL が表示されます。
  13. どの時点でファイルをアップロードするかを指定するには、「アップロードファイル」ドロップダウンリストから適切なオプションを選択します。The available options are: Manually, On Save, and On Run.
  14. You also have the options to Preserve Remote File Permissions or Upload Files Directly.

If you are using Remote Debugging or Symbolic Links, click Advanced and set up path mapping. See Path Mapping.

スクリプト

  1. 「実行方法」ドロップダウンリストから「スクリプト」を選択します。
  2. PHP エンジンの場所を指定するには、「PHP インタプリタ」フィールドの横にある「設定」ボタンをクリックします。「オプション」ダイアログの「PHP」タブが開きます。
  3. 「PHP 5 インタプリタ」フィールドで、php.exe ファイルへのパスを指定します。必要に応じて「参照」ボタンを使用します。
  4. スクリプトの実行結果の表示方法を指定するには、「結果を開く場所」領域で適切なチェックボックスを選択します。次のオプションがあります。

  5. 「閉じる」をクリックします。「オプション」ダイアログが閉じ、システムは「実行構成」パネルに戻ります。

Path Mapping

If you are using Remote Debugging or Symbolic Links, you need to manually define path mapping for individual run configurations. To define path mapping:

  1. In the Run Configuration panel, click Advanced (not available for Script configurations). The Advanced Web Configuration dialog opens.
  2. Select the debug URL:
    • The default URL, as shown in the panel
    • Ask Every Time, which prompts you for the URL every time you start a debugging session
    • Do Not Open Browser, which starts the debug session without opening a browser window. You need to open your web browser and browse for the URL. Note that the GET (or POST) variable XDEBUG_SESSION_START is needed.
  3. Click New to add a mapping. Enter the server path and the project path.
  4. If you are using the Debugger Proxy, enter the host name and port.
関連項目
開発済みソースを使用しない新規 PHP プロジェクト
開発済みソースファイルの新規プロジェクトへのインポート

著作権と商標について