30秒でPHP開発環境ができるというphpcloudのメモ
phpcloud使うためのメモを残しておきます。
https://my.phpcloud.com/user/login
にアクセスして、アカウント取得。
アカウント取得後ログインして、Container作ります。
https://my.phpcloud.com/welcome
にアクセスすると、
Get a free PHP environment in 30 seconds
って、30秒でPHP環境が手に入るんですね!
Start Now
をクリックしてやってみます。
ContainerNameなど必要事項に入力して、Create containerボタンをクリック。
例えばtestcontという名前のContainerを作ったら、
左メニューにtestcontができます。
phpcloudは、
Container => Application
という構造になってます。
既に、Default Applicationというのがあるので、多分30秒でPHP環境できてますね。
ここで、Applicationを作りたいので、
testcontをクリックして、New Applicationボタンをクリック。
すると、DeployするApplicationの種類を選べとあるので、
今回はEmpty PHP ApplicationのDeploy Applicationをクリック。
Application Nameにtestと入力して、Deploy Applicationをクリック。
これで、testというアプリケーションができるので、
http://testcont.my.phpcloud.com/test/
にアクセスして、表示を確認。
phpcloudの管理画面に戻って、Applicationのtest行の git をクリック。
git repository URLがこんな感じになっているので、コピー。
https://testcont@testcont.my.phpcloud.com/git/test.git
さて、macの場合、例えば、
$ ls
phpcloud
$cd phpcloud
$ git clone
https://testcont@testcont.my.phpcloud.com/git/test.git
$ vi test/public/index.php
<?php $disp_message = 'Hello phpcloud!'; ?> <!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="UTF-8"> <title>Hello phpcloud</title> </head> <body> <?php echo $disp_message ?> </body> </html>
$ git add public/index.php
$ git commit -a -m "add public/index.php"
$ git push origin master
ブラウザで、作成したアプリを開く。
http://testcont.my.phpcloud.com/test/index.php
ほんとに、30秒でPHP環境はできるし、
ささっと何かつくるには早いですね。
上記、はしょっているかもしれないので、
いきづまったら、ここ参照のこと。
https://my.phpcloud.com/help