8月
24
2008
Vista+xamppでphpコマンドライン実行する。
投稿者: lllnorikolll, カテゴリ: メモ箱, tags: Gallery2, PHP, Vista, xamppVista+xamppで、Gallery2のモジュールのひな形を作るメモだったりします。
[スタート]⇒[コンピュータ]を右クリック⇒[プロパティ]⇒[システムの詳細設定]⇒[続行]でシステムのプロパティ画面が開く。「詳細設定」タブの「環境変数」ボタンを押す。
「システムの環境変数の欄に「Path」という項目があるので、その項目を選択して「編集」ボタンを押す。「変数値」の最後に「;c:\xampp\php」を追記。
で、OKOKで画面を閉じていく。コマンドプロンプトを立ち上げっぱなしの場合は、一度閉じてから開く。
実行したいPHPファイルのあるディレクトリに移動して、「php ファイル名.php」で実行できる。
が!!!だ、Gallery2のモジュールのひな形を作成するcreate-module.phpをこの方法で実行すると、下記のメッセージが出る。
C:\xampp\htdocs\gallery2\lib\tools\creator>php create-module.php
You must run this from the gallery2 directoryしかたないので、C:\xampp\htdocs\gallery2まで移動してから実行したらうまくいった!
C:\xampp\htdocs\gallery2>php lib\tools\creator\create-module.php What is the name of your module? [Hello World] (ここはモジュール名ほげほげー) What is the id of your module? [wifigadgets] (ここはモジュールIDほげほげー) * * * * * * * * * * * * * * * * * * * * * * * * * * Your module is ready! You must build it by doing: cd modules/(ここはモジュールIDほげほげー)/classes make && make clean Then you can go to the Site Admin -> Modules page and install and activate your module! * * * * * * * * * * * * * * * * * * * * * * * * * *

エントリ (RSS)