tag:blogger.com,1999:blog-17103716825346999142024-02-20T01:08:44.543+09:00php講習の記録php(Web)講習の記録です。
php,MySQL,smartyとsymfony 1.0.20の記述があります。
開発環境はeclipse,xampp(php smarty)とlinux(CentOS,symfony)です。Unknownnoreply@blogger.comBlogger75125tag:blogger.com,1999:blog-1710371682534699914.post-91715100178337562522011-03-28T17:29:00.004+09:002011-06-14T08:43:24.320+09:00symfonyで掲示板作成、criteriaphp講習 3/28<br />
<br />
天気が良いので外は気持ちいい。<br />
しかし、花粉が心配。<br />
<br />
1時間目<br />
・先週の復習<br />
criteria<br />
・symfony、「モデルによるCRUD」から<br />
Webアプリでは、DB操作で下記4つの機能で実現できます。<br />
Create<br />
Read<br />
Update<br />
Delete<br />
<br />
・モデルでの書き方<br />
memberの場合、IDとcreated_atは記述しない。モデルで自動的にセットする。<br />
・action.class.phpで記述をして、アクセスし、データがinsertされることを確認する。<br />
・commentテーブルでも同様の記述を行い、データがinsertされることを確認する。<br />
<br />
2時間目<br />
・insert,delete<br />
・オブジェクトを使ってDBを操作、ORマッピング<br />
Web開発の現場では、SQLは使わずORマッピングで開発しています。<br />
<br />
・以上の使い方に慣れる<br />
member_addモジュールを作成。<br />
$ symfony init-module front member_add<br />
insert,confirm,resultアクション作成。<br />
inputSuccess.php<br />
confirmSuccess.php<br />
resultSuccess.php<br />
<br />
<br />
3時間目<br />
・午前の答え合わせ<br />
<pre class="prettyprint">class member_addActions extends sfActions
{
public function executeInput()
{
return sfView::SUCCESS;
}
public function executeConfirm()
{
// パラメータで受け取る
$this->nickname = $this->getRequestParameter('nickname') ;
$this->mailaddress = $this->getRequestParameter('mailaddress') ;
return sfView::SUCCESS;
}
public function executeResult()
{
// パラメータで受け取る
$nickname = $this->getRequestParameter('nickname') ;
$mailaddress = $this->getRequestParameter('mailaddress') ;
// symfonyでモデルの書き方(CRUD:insert)
// まず、空の行を作る
$member = new Member();
// データをセットする
$member->setNickname($nickname) ;
$member->setMailaddress($mailaddress);
// 保存する
$member->save();
return sfView::SUCCESS;
}
}
</pre>・今やっているところは、アプリケーション名、モジュール名(アクション名)の関係が<br />
わかるようになって下さい。<br />
・会員一覧ページを作る(app:member_list/index)<br />
一覧表はfrontモジュールのincexアクションと同じことをやっているので参考にして下さい。<br />
$ symfony init-module front member_list<br />
・編集ボタンで編集できるようにする。(app:member_edit)<br />
$ symfony init-module front member_edit<br />
indexSuccess.php<br />
・編集用アクションinput,confirm,resultを作成する。<br />
inputSuccess.php<br />
confirmSuccess.php<br />
resultSuccess.php<br />
<br />
4時間目<br />
・答え合わせ<br />
<br />
5時間目<br />
・答え合わせ、member_list/indexSuccess.php<br />
<br />
6時間目<br />
・答え合わせ、member_edit/inputSuccess.php,confirmSuccess.php,resultSuccess.php<br />
<pre class="prettyprint">public function executeInput()
{
$id = $this->getRequestParameter('id') ;
$this->member = MemberPeer::retrieveByPK($id) ;
return sfView::SUCCESS;
}
public function executeConfirm()
{
$this->id = $this->getRequestParameter('id') ;
$this->nickname = $this->getRequestParameter('nickname') ;
$this->mailaddress = $this->getRequestParameter('mailaddress') ;
return sfView::SUCCESS;
}
public function executeResult()
{
// パラメータで受け取る
$id = $this->getRequestParameter('id') ;
$nickname = $this->getRequestParameter('nickname') ;
$mailaddress = $this->getRequestParameter('mailaddress') ;
// 更新したい行(オブジェクト)をまず取得する
$member = MemberPeer::retrieveByPK($id) ;
$member->setNickname($nickname) ;
$member->setMailaddress($mailaddress);
// 保存する
$member->save();
return sfView::SUCCESS;
}
</pre><br />
・一覧画面に削除リンクを付け、削除処理を追加する。<br />
モジュールはmember_list<br />
<pre class="prettyprint">public function executeDelete()
{
// DBアクセス
$id = $this->getRequestParameter('id') ;
$member = MemberPeer::retrieveByPK($id) ;
// データを削除する(一度削除するともうないので判断を入れる)
if ($member) {
$member->delete();
}
return sfView::SUCCESS;
}
</pre><br />
・明日はdeleteを解説<br />
・今日やったところであやふやな部分がある人はモジュールをlinux上でリネームして<br />
復習をして下さい。<br />
(eclipseでリネームすると文字化けすることがあるのでlinux上でリネームする)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-31045811675931632232011-03-25T17:31:00.008+09:002011-06-14T08:41:22.039+09:00symfonyで掲示板作成(復習)php講習 3/25<br />
<br />
・作業の前に<br />
vmwareを起動し、linux(CentOS)を立ち上げる<br />
puttyでlinuxに一般ユーザでログイン、プロジェクトのディレクトリに移動<br />
eclipseを起動<br />
ブラウザを起動、Webテキストを開いておく<br />
<br />
<br />
1時間目 <br />
今日、午前中は昨日の復習<br />
プロジェクトbbs2のディレクトリをバックアップ(bk.bbs2)<br />
ディレクトリbbs2作成<br />
(1)プロジェクト作成<br />
symfony init-project bbs2<br />
<br />
(2)アプリケーション作成<br />
$ symfony init-app front<br />
$ symfony init-app backend<br />
$ symfony init-app mypage<br />
<br />
(3)各アプリケーションにデフォルトモジュール作成、アクセス確認<br />
$ symfony init-module front default<br />
$ symfony init-module backend default<br />
$ symfony init-module mypage default<br />
・アクセスで使うviewアクションを指定<br />
/bbs2/apps/front/modules/default/actions/actions.class.php<br />
/bbs2/apps/front/modules/default/templates/indexSuccess.php<br />
/bbs2/apps/backend/modules/default/actions/actions.class.php<br />
/bbs2/apps/backend/modules/default/templates/indexSuccess.php<br />
/bbs2/apps/mypage/modules/default/actions/actions.class.php<br />
/bbs2/apps/mypage/modules/default/templates/indexSuccess.php<br />
<br />
(4)backend,mypage各ページに/区切りのURLでアクセス<br />
・アクセスパスの調整<br />
使ったコマンドは、実行の順番に並んでいないので注意!<br />
$ mkdir backend<br />
$ mkdir mypage<br />
$ mv backend.php backend_dev.php backend<br />
$ mv mypage.php mypage_dev.php mypage<br />
$ cp .htaccess backend<br />
$ cp .htaccess mypage<br />
$ cd backend/<br />
$ cd mypage/<br />
<br />
$ vi .htaccess<br />
$ vi backend.php<br />
$ vi .htaccess<br />
$ vi mypage.php<br />
<br />
(5)レイアウトを昨日のソースを参照して作る。<br />
Viewの説明<br />
「レイアウトテンプレート」+「アクションで作成されるテンプレート」の組み合わせである<br />
レイアウト<br />
/bbs2/apps/front/templates/layout.php<br />
CSS<br />
/web/css/main.css<br />
設定変更を反映する<br />
$ symfony cc<br />
・レイアウトとスタイルはメールで送付します。<br />
<br />
(6)DBのアクセス情報を設定する<br />
・DB定義<br />
/bbs2/config/databases.yml<br />
/bbs2/config/propel.ini<br />
<br />
・schema.ymlを作成する<br />
$ symfony propel-build-schema<br />
<br />
・モデルファイルを作成する<br />
$ symfony propel-build-model<br />
bbs2/lib/modelにモデルファイルが作成されている<br />
<br />
・DBアクセスし確認する<br />
PHPファイル<br />
$this->member = MemberPeer::retrieveByPk(1);<br />
テンプレートファイル<br />
<?php print $member->getNickname();?><br />
<br />
・URLとモジュール/アクションの関係は理解していないと先に進んだとき<br />
何処を修正したら良いか分からなくなります。<br />
・フロントコントローラ<br />
アクセスがあったとき、どのモジュールに処理を渡すかコントロールする部分<br />
<br />
2時間目<br />
・引き続き課題<br />
・答え合わせ<br />
<br />
3時間目<br />
・答え合わせ、続き<br />
<br />
4時間目<br />
・答え合わせ、続き、DB接続から<br />
symfonyの関数名、大文字で書かないとエラーになるところとエラーにならないところがある。<br />
これは、覚える以外にない。<br />
<br />
・エラーがでたとき、以下にアクセスして確認<br />
/front_dev.php<br />
<br />
・画面の画像が化けるとき<br />
symfony設定ファイルのシンボリックリンクを作成<br />
/usr/share/pear/data/symfony/web/sfフォルダが/home/teacher/bbs2/web/sfで参照できるようシンボリックリンクを貼る<br />
$ cd /home/teacher/bbs2/web/<br />
$ ln -s /usr/share/pear/data/symfony/web/sf ./sf<br />
<br />
<br />
・backend(mypage)にも設定<br />
backend_dev.phpのパスも修正<br />
$ ln -s ../sf ./sf<br />
<br />
・本番環境で、リリースする場合は、_devは削除しておく。<br />
残してあるとセキュリティホールになります。<br />
<br />
5時間目<br />
・<a href="http://www.google.co.jp/url?sa=t&source=web&cd=2&ved=0CCAQFjAB&url=http%3A%2F%2Fwww.nextren-development.com%2Fsymfuldaze%2Fcriteria%2Fwhats_peer&ei=ADmMTbC3IYKKvQOsory4DQ&usg=AFQjCNEBZ3Tv_9HOgma0MszNUX8-JQQ_2g&sig2=OK59Wpph3IIiSHrQMQVkNw">Peer</a>でアクセス<br />
・<a href="http://symfony.xrea.jp/1.0/book/08-Inside-the-Model-Layer.html#retrieving.records.with.criteria">Criteria(クライテリア)</a>による条件指定<br />
SQLでDBに問い合わせをするとき条件は、where句を使用していました。<br />
Criteria基準<br />
$c = new Criteria();<br />
$c->add(テーブル名Peer::カラム大文字, 指定する値)<br />
<br />
$c = new Criteria();<br />
$c->add(MemberPeer::ID, 1)<br />
条件を複数指定可能<br />
全てのデータを取得したい場合、条件を空にする。<br />
$member = MemberPeer::doSelect($c);<br />
doSelectは配列でデータを受け取る。<br />
・テンプレート側<br />
<?php foreach ($members as $member):?><br />
<?php print $member->getNickname();?><br /><br />
<?php endforeach;?><br />
<br />
foreach でmembersとmemberの書き方も習慣として書く<br />
・ニックネームとメールアドレスを表示し、テーブルタグにする<br />
テーブルタグは書けるようになっておいて下さい。<br />
・memberができたら、commentテーブルも表示して下さい。<br />
<br />
6時間目<br />
・条件設定<br />
カラム名は大文字で記述する。<br />
<br />
複数条件の指定<br />
<pre class="prettyprint">$c = new Criteria();
$c1 = $c->getNewCriterion(MemberPeer::CREATED_AT, "2011/01/10" ,Criteria::GREATER_THAN);
$c2 = $c->getNewCriterion(MemberPeer::NICKNAME, "%wata2%" ,Criteria::LIKE);
$c1->addOr($c2);
$c->add($c1);
$this->member = MemberPeer::doSelect($c);
</pre>・複数条件しては、orのときしか使わない、andのときはほとんど使わない。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-70311249459646206302011-03-24T20:51:00.005+09:002011-06-14T08:39:33.458+09:00symfonyで掲示板作成php講習 3/24<br />
<br />
今日も外の掃除は寒かった。<br />
<br />
1時間目<br />
・昨日の復習<br />
プロジェクトの確認<br />
アプリケーションの確認<br />
プロジェクト直下でモジュール作成<br />
フォルダ構成の確認<br />
<br />
・eclipse,phpソースの整形方法(便利) <br />
Ctr + Shift + F<br />
<br />
・昨日の課題の答え合わせ<br />
アクション(action.class.php)<br />
テンプレート(inputSuccess.php,confirmSuccess.php,resultSuccess.php)<br />
<br />
2時間目<br />
・続き、テンプレート(confirmSuccess.php)<br />
<br />
・入力画面にメールアドレス(mailaddress)を追加し、完了画面まで渡す。(作業時間10分で)<br />
アクション(action.class.php)<br />
テンプレート(inputSuccess.php,confirmSuccess.php)<br />
<br />
・今回の作業であやしい人は、新しい変数を追加して手順を確認する。<br />
<br />
・昨日は、bbs2プロジェクトで、frontアプリケーションを作った<br />
URLとモジュール、アクションの関係<br />
<br />
正しくは、http://ドメイン名/アプリケーションのフロントコントローラ名/モジュール名/アクション名<br />
一番最初に作成したフロントコントローラ名は省略可能<br />
<br />
/bbs2/web/index.php<br />
アプリケーションのフロントコントローラ<br />
(全てのリクエストを受け取るところ)<br />
<br />
・バックエンドアプリケーション(backend)作成<br />
プロジェクト直下へ<br />
symfony init-app backend<br />
管理機能画面<br />
アプリケーションごと(backend)のリクエストを受け取るフロントコントローラは、backend.php<br />
<br />
・デフォルトモジュール作成<br />
symfony init-module backend default<br />
結果を確認<br />
<br />
・バックエンドの機能確認<br />
<br />
http://ドメイン名/アプリケーションのフロントコントローラ名/モジュール名/アクション名<br />
backend.php/default/index<br />
業界として、phpが付くのはかっこ良くない。<br />
ここをbackendでアクセスできるようになる。設定と説明は午後。<br />
<br />
3時間目<br />
最初に作ったアプリケーションのモジュールにアクセスするときだけ、<br />
フロントコントローラ名は省略出来ます。<br />
2番目以降に作ったものは省略出来ません。<br />
(backendは省略出来ません)<br />
<br />
・backend.phpをbackendにする作業は、<br />
今後アプリケーションを追加するときその都度作業するので忘れないように。<br />
・アプリケーション名のディレクトリを作成<br />
cd bbs2/web<br />
mkdir backend<br />
mv backend.php backend_dev.php ./backend<br />
cp .htaccess ./backend<br />
<br />
apacheの設定ファイルを変更<br />
vi .htaccessで以下の2行を修正<br />
RewriteBase /<br />
RewriteRule ^(.*)$ /backend/backend.php [QSA,L]<br />
<br />
パスを変更<br />
backend.phpを修正<br />
define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/../..'));<br />
スタイルシートへのパスが切れているので、文字のサイズは変わった。<br />
<br />
・アプリケーションを作成<br />
・デフォルトモジュールを作成<br />
・フロントモジュールでアクセス出来ることを確認<br />
・設定を変更し、アプリケーション名でアクセス出来ることを確認する。<br />
<br />
・アプリケーションを作成<br />
symfony init-app backend<br />
symfony init-app mypage<br />
<br />
・デフォルトモジュールを作成<br />
symfony init-module backend default<br />
symfony init-module mypage default<br />
<br />
・フロントモジュールでアクセス出来ることを確認<br />
まず、アクションで出力<br />
print "backend" ;<br />
return sfView::SUCCESS;<br />
次に、URLでアクセス<br />
<br />
・設定を変更し、アプリケーション名でアクセス出来ることを確認する。<br />
ディレクトリを作成し移動と、コピー<br />
アクセスのための設定変更対象<br />
.htaccess<br />
backend.php<br />
<br />
・出来た人は、別のアプリケーション(mypage)を作成して同じ作業を行う。<br />
アクセス出来ないときは、ブラウザを一度閉じてから開くとアクセス出来ることがある。<br />
<br />
4時間目<br />
・作業をmypageで実施。<br />
・作業手順があやふやな人は、アプリケーション、モジュールを作って作業をやってみる。<br />
<br />
・会員登録のリンク<br />
<a href="/member_add/input">会員登録</a><br />
<br />
・layout.phpの説明<br />
<head>タグの内容は記述されていないが、以下のファイルで修正可能<br />
設定ファイルを修正したら、コマンドを実行<br />
symfony cc<br />
→変更が反映されなかった<br />
>> file- Permission denied in /usr/share/pear/symfony/vendor/pake/pakeFunction.php on line 197<br />
# chomod 777 -R front<br />
symfony ccをrootで実行すると権限がおかしくなることがあるらしい。<br />
<br />
5時間目<br />
keywords 検索エンジンで引くキーワード、カンマ区切り<br />
個別に行うときは、部品化、もしくは、viewから削除<br />
<br />
スタイルシートの指定も可能<br />
デフォルトはmain /web/css/main.css<br />
複数指定は、カンマ区切り<br />
javascriptはいまは何もしない。<br />
haslayout レイアウトを使わない設定も可能。<br />
複数のレイアウトを使う設定も可能。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-43951688062840953732011-03-23T17:31:00.006+09:002011-06-14T07:34:50.262+09:00symfony概要説明php講習 3/23<br />
<br />
・今日は、外の掃除。意外と寒い。<br />
<br />
1時間目<br />
・昨日の復習から<br />
Webテキストに従って、symfonyの概要説明<br />
プロジェクト、アプリケーション作成<br />
phpプログラムを変更して表示出来るようにした。<br />
<br />
・linuxで作業するときは、自分のいるところ(フォルダ)を認識しておく<br />
$ pwd<br />
/home/user/bbs2/apps/front<br />
<br />
・モジュールは、modulesディレクトリに入っています。<br />
defaultモジュールを確認する。<br />
<br />
・プロジェクト直下(bbs2直下)に移動<br />
一度、front以下を削除<br />
再度、frontアプリケーションを作成<br />
$ symfony init-app front<br />
defaultモジュール作成<br />
$ symfony init-module front default<br />
<br />
<br />
2時間目<br />
・「actions.class.php」は処理を書くところ、アクションの説明はあとで<br />
/home/teacher/bbs2/apps/front/modules/default/actions/actions.class.php<br />
記述を修正<br />
関数executeIndex()の「execute」を除いた部分がアクション名(index)<br />
return sfView::SUCCESS;<br />
→テンプレートでindexSuccess.phpを使う。<br />
<br />
・アクションの説明<br />
データベース操作(CRUD)<br />
create<br />
read<br />
update<br />
delete<br />
<br />
・アクションの機能<br />
1. リクエストパラメータ(GETやPOSTで渡ってくる値)の取得<br />
2. モデルを使用したデータベース操作(CRUD)<br />
3. viewに渡す変数のアサイン<br />
4. テンプレートの種類の決定<br />
smartyで3の機能は使ったし、4のテンプレートも使っています。<br />
<br />
1.リクエストパラメータの取得<br />
・getでurlから渡す方法<br />
http://www.user.com/?id=20<br />
print $this->getRequestParameter('id');<br />
パラメータをテンプレートに渡す<br />
(Webテキストはスペルが違っているのでコピーするときは注意)<br />
<br />
・URLでパラメータを設定し、テンプレートに渡す<br />
http://www.user.com/?name=name&adr=pref<br />
<br />
<br />
3時間目<br />
・2時間目の答え合わせ(アクションで受け取る、テンプレートに渡す)<br />
・POSTで渡せるようフォームを作成<br />
フォームのタグは問題なく書けるようになっておいて下さい。<br />
→今日の最後の課題で実際使いました。 <br />
<br />
1.リクエストパラメータの取得<br />
3:viewに渡す変数のアサイン<br />
<br />
4:テンプレートの種類の決定<br />
「sfView::SUCCESS」以外のアクションの種類はあまり使わない。<br />
基本的には、「sfView::SUCCESS」をreturnする。<br />
<br />
return sfView::XXXXX (SUCCESS)アクション名 + ビューの種類.php(例 indexSuccess.php)<br />
<br />
アクションを追加して動きを確認する<br />
executeNews()<br />
executeArticle()<br />
<br />
テンプレートも追加<br />
newsSuccess.php<br />
articleSuccess.php<br />
<br />
呼び出し<br />
ドメイン名 + /default(モジュール名)/action名<br />
何もなしだと、/default/indexアクションに飛ぶ<br />
それ以外だと、指定(/モジュール名/アクション名)が必要<br />
<br />
<br />
4時間目<br />
・URLとモジュール/アクション/関数名の関係は重要です。<br />
(これが今日の授業のポイントです) <br />
・アクションを5個新たに作成して表示する。<br />
・blogモジュールを追加して、indexアクションから表示する。<br />
<br />
・フォームのモジュール名、アクション名を指定してパラメータを受け渡す。<br />
フォームの飛び先は(ドメイン名+)/モジュール名/アクション名 <br />
<br />
5時間目<br />
・Viewの説明<br />
1. 「レイアウトテンプレート」+「アクションで作成されるテンプレート」の組み合わせである<br />
→これから説明<br />
2. HTMLの記述や、処理を簡略化するためのヘルパーという機能が使える<br />
→ヘルパーの項目で説明(明日以降?)<br />
3. 共通で使うViewを部品化できる(パーシャル、スロット、コンポーネント)<br />
→別の機会に説明(明日以降?)<br />
4. テンプレートには素のPHPを記述できる<br />
→いままで作業してきた通り。<br />
smartyのように特殊な書き方はありません。<br />
<br />
・Webで表示されたsymfonyページのソースを参照(ctr+U)<br />
テンプレートの記述にあるソース(indexSuccess.php)と比較する。<br />
bodyタグ以外の部分の記述は、以下のファイルに記述(アプリケーション共通部分)<br />
apps/front/templates/layout.php<br />
アプリケーション共通部分以外は、以下に入る。<br />
<?php echo $sf_data->getRaw('sf_content') ?><br />
<br />
・CSSの記述<br />
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css" /><br />
symfonyのcssはプロジェクト直下にある。<br />
web/css/main.css<br />
<br />
・CSSの解説<br />
idはページ内に1つだけ<br />
クラスは、同じページに何個あってもいい<br />
headerの場合、ページ内にheaderを記述するのは1回のみなのでIDで設定。<br />
<br />
<br />
6時間目<br />
CSSを別(main.css)に記述<br />
layout.phpで、HTMLの可読性が上がっていることがわかる。<br />
<br />
・今日最後の課題:member_add modを作成し、アクション3個設定<br />
input、confirm、resultアクションを作成<br />
$ symfony init-module front member_add<br />
<br />
・機能<br />
名前入力 →postで名前を渡す<br />
確認画面 →post(hidden)で名前を渡す<br />
完了画面<br />
<br />
・出来たら、メニューの下に「会員登録」でリンクを張る<br />
リンク先は、ドメイン名+/モジュール名/アクション名(/member_add/input)<br />
・解説は明日Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-1710371682534699914.post-65687752384275455932011-03-22T17:11:00.009+09:002011-06-14T07:31:14.115+09:00symfony入門php講習 3/22<br />
<br />
久々の授業でしたが、雨で掃除はありませんでした。 <br />
<br />
今日は、節電のため電車の暖房が無くとても寒かった。<br />
<br />
1時間目<br />
・VMWareにてCentOS起動<br />
puttyにでログイン<br />
<br />
・symfonyは、1ケ月位は(慣れるまで)何をやっているか分からない状態が続きます。<br />
なれれば、通常のPHPに戻るのが面倒になるくらいになります。<br />
<br />
・停電のときのために、Webテキストをローカル環境に作成する。<br />
まず、デスクトップにkikinフォルダをコピー<br />
<br />
・symfony環境(テキスト環境)のためユーザ追加 kikin<br />
# useradd kikin<br />
# passwd kikin<br />
<br />
・ffftpで、kikinユーザでログイン<br />
ffftpには新規接続設定を追加<br />
kikinフォルダのデータ(内容)を/home/kikinにコピー<br />
<br />
・設定変更、バーチャルホストの設定を説明<br />
(/xampp/apach/conf/extra/httpd/v-hosts.conf)<br />
/etc/httpd/conf/httpd.conf<br />
バーチャルホスト設定のとき、「NameVirtualHost *:80」をコメントから外すのを忘れないように。<br />
<br />
ここで停電のためPCのバッテリーが切れました。<br />
<br />
2時間目<br />
・各自希望のWebアプリを設計する<br />
DB設計<br />
画面遷移<br />
<br />
3時間目<br />
停電が復旧しました。<br />
<br />
・バーチャルホストの設定を実施<br />
# vi /etc/httpd/conf/httpd.conf<br />
<br />
・apache再起動<br />
# /etc/rc.d/init.d/httpd restart<br />
<br />
・windowsのhostsファイルにホスト名追加<br />
windowsのコマンドラインから バーチャルホスト名にpingして、戻ることを確認する。<br />
<br />
・config.phpのsymfonyのパスをlinuxにあわせる<br />
# vi /home/kikin/config/config.php<br />
(viは、これから良く使うので慣れるしかありません) <br />
<br />
・権限設定(テキストがapachから見えるように)<br />
# chmod -R 755 /home/kikin<br />
<br />
・画像データをメールで送付したので、ftpで転送する。ユーザはkikin<br />
転送先は、/home/kikin/web、展開のコマンドは以下の通り。<br />
$ tar -xvzf img.tar.gz<br />
テキストの図が表示されていればOK。<br />
<br />
4時間目<br />
・ローカルのWeb画面を見て、画像が表示されていればOK<br />
ローカルの画面が見れない人は、今回はオンラインの画面を見て作業を進める。<br />
<br />
・以下、テキストに従いフレームワークの説明<br />
Mojaviを元に開発されたフレームワーク<br />
symfonyのルールに従って開発、<br />
<br />
・MVCモデルの図の説明<br />
現状では、理解していなくてもOK<br />
<br />
・徹底的にYAML 化された設定<br />
→定義をYAMLの書式で記述<br />
<br />
・OR マッパーPropel との融合<br />
→DBとの接続<br />
<br />
・symfonyのプロジェクト作成、一般ユーザにて作業<br />
$ su - user<br />
$ mkdir bbs2<br />
$ cd bbs2<br />
$ symfony init-project bbs2<br />
<br />
・アプリケーションの初期化<br />
$ symfony init-app front<br />
<br />
・モジュール作成<br />
symfonyのコマンドを入れるときは、プロジェクトディレクトリ直下で実行すること<br />
(実行ユーザは一般ユーザで) <br />
$ symfony init-module front default<br />
<br />
・バーチャルホストの設定<br />
# vi /etc/httpd/conf/httpd.conf<br />
<br />
・サーバ再起動<br />
# /etc/rc.d/init.d/httpd restart<br />
<br />
・権限がないため、ユーザのホームディレクトリ権限変更<br />
$ su -<br />
# cd /home<br />
# chmod -R 755 user<br />
Webでアクセスしたとき以下の表示<br />
Oops! An Error Occurred<br />
The server returned a "500 Internal Server Error".<br />
<br />
<br />
・eclipseにて、CentOSのファイルアクセス設定、phpソースの修正<br />
ウインドウ/パースペクティブ/リモートシステムエクスプローラ<br />
新規接続で、linuxユーザを設定、homeディレクトリが見れるようにする。<br />
phpファイル修正<br />
bbs2/apps/front/modules/default/actions/actions.class.php<br />
→executeIndex()を、return sfView::SUCCESS;<br />
同/templates/indexSuccess.php<br />
→Helloのコメントを記入<br />
(この部分はWebテキストに記述があります)<br />
eclipseでlinux上のphpソースが編集できることが判って非常に便利。<br />
毎回ftpで送らないといけないと思ってました。<br />
<br />
・コメントが表示されない人は、以下の操作を実施<br />
$ su ユーザ<br />
$ cd /home/user/bbs2<br />
$ symfony fix-perms<br />
$ symfony cc<br />
<br />
ちなみに、うまくアクセス出来ないときは、/var/log/httpd/にバーチャルホストで<br />
指定したログが出ているので、見てみれば何かヒントがあるかもしれません。<br />
# tail xxxx-error_log<br />
<br />
・解説は明日(お休みの予定だったけど地震で休校になった時間の振り替え)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-2166792024922309532011-03-16T22:17:00.005+09:002011-06-13T10:57:26.345+09:00phpで楽天 ジャンル配列データの作成今週は休校が決まりました。 <br />
<br />
楽天のジャンルデータの作成は、XMLのデータが取得できますが、<br />
手作業で配列データを作成するのは少し手間がかかります。<br />
<br />
Excelで作成するのは慣れていましたが、OpenOfficeはまだ慣れていないので配列としてデータを加工するのに時間がかかります。<br />
<br />
折角なので、phpで出来ないものか探したところ、同じことをしてくれた人がいました。<br />
<a href="http://webtech-walker.com/archive/2007/04/06023523.html">Pear XML_Serializerを使ってみた - Webtech Walker</a>を参考に配列データを作りました。<br />
<pre class="prettyprint">require_once 'XML/Unserializer.php';
$xml = file_get_contents("http://api.rakuten.co.jp/rws/3.0/rest?developerId=(開発者ID)&operation=GenreSearch&version=2007-04-11&genreId=0");
$Unserializer =& new XML_Unserializer();
$Unserializer->setOption('parseAttributes', TRUE);
$status = $Unserializer->unserialize($xml);
if ($status === true) {
$res_array = $Unserializer->getUnserializedData();
// print_r($res_array);
foreach ($res_array['Body']['genreSearch:GenreSearch']['child'] as $key => $value) {
$genre_array[] = $value ;
}
// print_r($genre_array) ;
}
</pre><br />
$genre_array[][genreId]にジャンルコード<br />
$genre_array[][genreName]に名称<br />
が入っています。セレクトの部分はこのようになります。<br />
<br />
<pre class="prettyprint"><select name="genre">
<?php foreach ($genre_array as $key1=>$value) { ?>
<option value="<?php echo $value[genreId] ?>" <?php if ($value[genreId] == $genre ) {
echo 'selected="selected"' ;} ?>><?php echo $value[genreName] ?></option>
<?php } ?>
</select>
</pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-68612503946263992182011-03-15T19:20:00.018+09:002011-06-14T07:29:17.667+09:00phpでAPIphp講習 3/15<br />
<br />
今日は、認定日のため午前中ハローワークに行って来ました。<br />
<br />
<2時間目><br />
最後に少しだけ出席、授業内容わからず、PCを起動して<br />
eclipse、XAMPP、VMwareの環境を起動したことこでお昼。<br />
楽天の何かをやってました。<br />
(楽天て聞くと円天を思い出すのは考えすぎか)<br />
今日は、出席者が少ないため、symfonyはやらないそうです。<br />
<br />
<3時間目><br />
お昼休みに、Webの手順どおり(おまけ/API)と聞いたので、とりあえず<br />
その通りにやってみる。<br />
(1)楽天のデベロッパーIDとアフィリエイトIDを取得<br />
(2)PEARライブラリの設置(パスは間違えないように)<br />
(3)サンプルコードに取得したIDを入れ、ローカルで実行。<br />
<pre class="prettyprint">require_once 'Services/Rakuten.php';
$api = new Services_Rakuten('デベロッパーID', 'アフィリエイトID');
$api->doItemSearch("山", "101070", array('sort' => '-reviewCount','page' => 1,'imageFlag' => 1));
$data = $api->getResultData();
print_r($data);
</pre><br />
実行結果画面で出力された$dataから、<a href="http://ja.wikipedia.org/wiki/Extensible_Markup_Language">XML</a>の<a href="https://docs.google.com/document/d/1KGMYT7h6DDsiVPgWuycV2EahEi4fhGSt7wx9CopSXhU/edit?hl=ja&authkey=CPTthecH">データ</a>を取得する。<br />
<pre class="prettyprint">Array
(
[count] => 112959
[page] => 1
[first] => 1
[last] => 30
[hits] => 30
[carrier] => 0
[pageCount] => 100
[Items] => Array
(
[Item] => Array
(
[0] => Array
(
[itemName] => ★あす楽対応★★レビューを書いて2点以上ご注文
...
[itemCode] => vvv:10002539
[itemPrice] => 2079
...
</pre><br />
サンプルのデータでキーワードは「山」、商品コード「101070」(スポーツ・アウトドア)<br />
このデータから、商品の情報を取得するためのphpコードを作成。<br />
<br />
ここまでは準備で、ここからが本題。<br />
(4)XMLのデータ($data)から、商品一覧を表示するテーブルをHTMLで作成する。<br />
使う項目は「mediumImageUrl」 「itemName」それとあとで「itemCode」<br />
ただし、以下のコードはブログを保存すると壊れるので、一部コードを変更しています。<br />
そのままコピーしてもつかえません。<br />
<br />
<table border='1'><br />
<php<br />
foreach ($data["Items"]["Item"] as $item) {<br />
print "tr" ;<br />
print "td" ;<br />
print "<img src=\"" . $item["mediumImageUrl"] . "\">";<br />
print "/td" ;<br />
print "td" ;<br />
print "商品 : " . $item["itemName"] ;<br />
print "<br />";<br />
print "価格 : " . $item["itemPrice"] ;<br />
print "/td" ;<br />
print "/tr" ;<br />
}<br />
><br />
<table><br />
<br />
さらににアフェリエイトのリンクも張った。<br />
<pre class="prettyprint">print "<td><a href=\"".$item["affiliateUrl"]. "\">" ;
print "<img src=\"" . $item["mediumImageUrl"] . "\">";
print "</a></td>" ;
</pre><4時間目><br />
(5)一覧が出来たら、フォームで、キーワード、ジャンルを指定して検索できるようにする。<br />
<pre class="prettyprint">if (isset($_POST["keywd"])) {
$keywd = $_POST["keywd"] ;
} else {
$keywd = "山" ;
}
if (isset($_POST["genre"])) {
$genre = $_POST["genre"] ;
} else {
$genre = "101070" ;
}
$api = new Services_Rakuten('デベロッパーID', 'アフィリエイトID');
$api->doItemSearch($keywd, $genre, array('sort' => '-reviewCount','page' => 1,'imageFlag' => 1));
$data = $api->getResultData();
</pre><br />
(6)一度入力した情報は、検索フォームに残すほうが親切。<br />
<pre class="prettyprint">キーワード:
<input type="text" name="keywd" size="30" value="<?php echo $keywd ?>"/>
</pre><br />
(7)ジャンルはポップアップにする。<br />
ポップアップのための配列データ取得は、<a href="http://webservice.rakuten.co.jp/api/genresearch/">「楽天ジャンル検索API」</a>から取得する。<br />
<pre class="prettyprint">http://api.rakuten.co.jp/rws/3.0/rest?
developerId=[YOUR_developerID]
&operation=GenreSearch
&version=2007-04-11
&genreId=0
</pre><br />
この実行結果から得られる<a href="https://docs.google.com/document/d/1Rv60uJGVWQe-QGvNsXX3eKel6tjH3KvH45GPWaunUNA/edit?hl=ja&authkey=CICo6ckD">XMLデータ</a>から、商品コードの配列を作成<br />
<pre class="prettyprint"><child>
<genreId>101070</genreId>
<genreName>スポーツ・アウトドア</genreName>
<genreLevel>1</genreLevel>
</child>
<child>
<genreId>100938</genreId>
<genreName>ダイエット・健康</genreName>
<genreLevel>1</genreLevel>
</child>
</pre><pre class="prettyprint">$data_array = array(
101070 => 'スポーツ・アウトドア' ,
100938 => 'ダイエット・健康' ,
); </pre>検索条件のjジャンルをフォームのセレクトにする。<br />
<pre class="prettyprint">商品:
<select name="genre">
<?php foreach ($data_array as $key1=>$value) { ?>
<option value="<?php echo $key1 ?>" <?php if ($key1 == $genre ) {
echo 'selected="selected"' ;} ?>><?php echo $value ?></option>
<?php } ?>
</select>
</pre>一覧表のカラムにadd.phpのリンクを追加し、add.phpで商品コードを受け取る。<br />
<pre class="prettyprint">print "<td>" ;
print "<a href=\"add.php?itemCode=".$item["itemCode"] . "\">追加する</a>" ;
print "</td>" ;
</pre><br />
結果として<a href="https://docs.google.com/leaf?id=0B3oprsNttkltNjU5N2VlZmUtNTI3OS00M2ViLWI0YTItZTVjZmIxZmRjNmMx&hl=ja&authkey=CJ_gvS0">こちら</a>になりました。<br />
<br />
<5時間目><br />
add.phpの作成、コメントを入力できるようにする。<br />
投稿結果をcommentテーブルに入れる。<br />
そのとき、以下の項目も入れられるように、commentテーブルもカラム追加しておく。<br />
ItemCode<br />
など5項目ほどあり、ここはメモをPCに残して来たので詳細は木曜日に追記します。<br />
<br />
<6時間目><br />
授業を始めようとしたことろで、停電のため中止。<br />
みんなしぶしぶ帰宅。<br />
<br />
これだと何をしているか判らないと思うので、<br />
phpのコードと作業の詳細は、PCのpearの環境を作ってからもう少し整理して追記します。<br />
明日は、お休みです。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-76545698318131444922011-03-11T17:25:00.006+09:002011-07-14T17:10:59.313+09:00CentOSにsymfonyをインストール訓練記録 3/11<br />
<br />
・掃除は今日も花粉症でお休みでした。<br />
<br />
<1時間目><br />
・firewallの設定(iptables)<br />
今回は開発環境の設定なので、本番環境とは異なることを認識して下さい。<br />
デフォルトでは、ファイアーウォールの設定がされていますが、これをとめます。<br />
内容はテキストどおり、保存したらサーバ再起動<br />
/etc/sysconfig/selinux<br />
SELINUX=enforcing<br />
↓<br />
SELINUX=disabled<br />
<br />
getenforce コマンドでdisabledを確認<br />
<br />
<br />
iptables -P INPUT ACCEPT<br />
iptables -P FORWARD DROP<br />
iptables -P OUTPUT ACCEPT<br />
<br />
#ルールクリア<br />
iptables -F<br />
<br />
#icmp(ping) と自端末からの入力を許可<br />
iptables -A INPUT -p icmp -j ACCEPT<br />
iptables -A INPUT -i lo -j ACCEPT<br />
<br />
#Web、FTP、POP、smtp による接続を許可<br />
iptables -A INPUT -p tcp --dport 80 -j ACCEPT<br />
iptables -A INPUT -p tcp --dport 21 -j ACCEPT<br />
iptables -A INPUT -p tcp --dport 110 -j ACCEPT<br />
iptables -A INPUT -p tcp --dport 25 -j ACCEPT<br />
<br />
#ssh による接続を許可<br />
iptables -A INPUT -p tcp --dport 22 -j ACCEPT<br />
<br />
#TCP の接続開始と応答、FTP データなどを許可<br />
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br />
<br />
#ルールをセーブする<br />
/etc/init.d/iptables save<br />
<br />
cat /etc/sysconfig/iptables<br />
<br />
# vi /etc/sysconfig/iptables<br />
#INPUTがDROPになっていたら修正<br />
:INPUT DROP [0:0]<br />
↓<br />
:INPUT ACCEPT [0:0]<br />
<br />
<br />
<2時間目><br />
・Apacheのインストール<br />
テキストのとおり<br />
yumは、ソフトをインストールするためのコマンド<br />
オプションの-y は、インストールの問い合わせに対して「y」と回答する<br />
・Apacheの設定<br />
/etc/init.d/httpd start<br />
/etc/init.d/httpd restart<br />
httpdのデーモン起動確認のコマンド<br />
> ps -ef | grep httpd<br />
PCからfirefoxで、ipアドレスを指定してapacheの画面が出ればOK<br />
<br />
・mysqlのインストールと設定<br />
/etc/init.d/mysqld start<br />
デーモン確認のコマンド <br />
> ps -ef | grep mysqld<br />
<br />
・phpのインストール<br />
時間がないので、午後<br />
<br />
・vsftpdのインストール<br />
ffftpで接続確認、サーバはCentOS(VMware)、ユーザは作った一般ユーザ<br />
# /etc/init.d/vsftpd start<br />
デーモン確認のコマンド <br />
#ps -ef | grep vsftpd<br />
<br />
<3時間目><br />
・ffftpでftpサーバへの接続確認<br />
PCからffftpで、ipアドレスを指定して一般ユーザでログインが出きればOK<br />
<br />
・phpインストール(今回)は、symfony 1.0.20をインストールするためphpは5.2)<br />
PHP 5.2.16<br />
# php -v<br />
<br />
・pearをインストール<br />
・symfonyをインストール、確認<br />
# symfony -V<br />
インストールモジュール確認 <br />
<br />
# pear list<br />
<br />
<br />
・環境を落とす<br />
vmware,ptty,ffftp<br />
<br />
・vmwareからcentOSを一度削除して再度インストール作業<br />
<br />
<4時間目><br />
・vmwareからcentOSを一度削除して再度インストール作業、続き<br />
<br />
<5時間目><br />
・phpinfo()でphp動作を確認<br />
mysqlのユーザを追加しようとして、<a href="http://plaza.rakuten.co.jp/hknopage/diary/200907160000/">エラーとなる</a><br />
flush privileges;<br />
ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist<br />
対応は、リンク先を参照した。<br />
<br />
・今日は地震で電車が止まって帰れない。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-89954041054894832812011-03-10T17:09:00.002+09:002011-06-06T00:12:23.199+09:00symfony環境設定の準備、その2 訓練記録 3/10<br />
<br />
・今日も花粉症で掃除はお休みでした。<br />
今日初めて掃除機で掃除してるの見た。<br />
<br />
<1時間目><br />
・火曜日から引き続きVMwareでCentOSを動かしてます。<br />
(1)一般ユーザでログイン<br />
(2)/home/ユーザ名/0310.txtを作成<br />
(3)yahooの記事内容をコピー<br />
(4)テキストの検索まで動作確認<br />
<br />
・puttyでの自動ログイン設定<br />
まず、puttyでCeontOSにログイン中のセッションを保存する。 <br />
puttyでログインするとき、ショートカットでリンク先をCentOSに指定。 <br />
"C:\Program Files\PuTTY\putty.exe" -load 接続セッション名 -l "ユーザ名" -pw "パスワード"<br />
ショートカットをランチャにドラックして登録、登録名を決める。<br />
<br />
・ランチャー(CraftLaunch)の登録結果を確認<br />
Ctrl+Shift+Space でランチャ起動を登録(ホットキーの割り当ては別に記述します)<br />
ここで、先ほどのputtyでVMwareのログイン名を指定して起動できることを確認する。<br />
<br />
<2時間目><br />
・viの操作復習と新しい操作方法<br />
カーソル移動コマンド<br />
<br />
<3時間目><br />
・viの操作復習<br />
phpの開発では、linux環境ではviかemacsで作業<br />
・linuxのコマンド(個々の説明はWebのテキストを参照)<br />
個々のコマンド、パイプ、リダイレクトの説明<br />
コマンドのヒストリ機能<br />
ディレクトリ操作<br />
<br />
<br />
<4ー5時間目><br />
・コマンドの説明、続き<br />
top load avg<br />
crontab (symfonyを使うとき利用するのでそのとき説明します)<br />
<br />
・ログの見方は、サーバ構築のあとで<br />
<br />
・lnコマンドは、あとでsymfonyを使ったとき使うコマンドなので詳しくはそのときやります。<br />
使い方は、windowsのショートカットと同じようなものです。<br />
<br />
<6時間目><br />
・今日やったコマンドの復習(自習)Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-78279678788843932142011-03-08T16:52:00.008+09:002011-06-05T23:21:56.780+09:00symfonyをlinux環境で使うための準備訓練記録 3/8<br />
<br />
・掃除は花粉症なのでお休みしました。<br />
<br />
<1-2時間目><br />
・VMWare、CentOSインストーラのコピー<br />
クラス全員がダウンロードしているためか、ネットワークが遅いため時間がかかった。 <br />
<br />
<3時間目><br />
VMwareとCentOSのインストール、インストール後CentOSを再起動しrootユーザでログイン確認。<br />
インストール手順は、時間があれば整理します。 <br />
<br />
<4時間目><br />
・vmware上のCentOS上から、ifconfigでIPアドレスを確認<br />
# ifconfig <br />
vmware上でCentOSのコマンドを入力することができますが、使いにくいので、puttyを使い操作します。puttyからの接続先としてIPアドレスを確認しておきます。 <br />
<br />
・puttyからCentOSのIPアドレスを指定して、rootでログイン確認<br />
・作業用ユーザの追加、ログイン確認<br />
(symfonyを使い出すと一般ユーザで作業することになります) <br />
# useradd user<br />
# passwd user<br />
一般ユーザで再びログイン、rootユーザに切り替え<br />
(-を付けると環境変数を引き継ぐ、場合によって使い分ける)を確認<br />
$ su -<br />
・ここで、ヤギーから質問、「ユーザを切り替えたらプロンプトが変わってた」<br />
さすがに鋭い。プロンプトで、「#」はrootユーザ、「\」は一般ユーザとして区別してます。<br />
<br />
・puttyの端末の文字コード変更<br />
設定の変更/変換/文字コードの設定/UTF-8(C,F)、保存を忘れずに<br />
・ユーザ追加の練習、もう一人ユーザを追加してログインを確認する。<br />
<br />
・スピーカーの音を消す設定<br />
putty - 端末/ベル<br />
VMware - サウンドカード<br />
<br />
<5ー6時間目><br />
・今日は何回か停電があり、プロジェクタが使えなくて説明が止まってます。<br />
・linuxコマンドの説明<br />
(各コマンドはWeb上に説明のページが山ほどあるので、自分にあった見やすいところを<br />
探しましょう)<br />
$ pwd<br />
$ ls -al<br />
$ vi<br />
また、linuxはmanコマンドがあります。でもlinuxの画面になれるまでは、<br />
Webの利用をお勧めします。<br />
$ man ls<br />
<br />
・一般ユーザを使って、vi(<a href="http://hp.vector.co.jp/authors/VA016670/unix/vi_reference.html">委員長の推奨ページ</a>)でテキスト編集の練習<br />
コマンドモードでのカーソルの移動、「h」「j」「k」「l」の各キーの動き<br />
(端末の設定によっては、カーソル移動は矢印キーも使えます。しかし、矢印キーは<br />
使えない場合もありますので、キーの使い方は慣れておくほうが無難です) <br />
・コマンドモードと入力モードの切り替え<br />
・ウインドウ上のテキストのコピー&ペースト<br />
キーワード検索<br />
・テキストファイルの内容確認<br />
> cat xxxxx.txt<br />
・linuxを使う上で、コマンドとviは必要な機能です。自分で最低限の作業が出来る程度に<br />
なれば困りません。<br />
<br />
・Linux(シェル)のテキスト補完機能<br />
ファイル名を途中まで入力して、TABキーでファイル名を補完<br />
シェルは、2種類(Bshell,Cshell)あって、 今の設定は、Bshell系のbashになってます。<br />
<br />
明日(3/9)はお休みです。<br />
(木)はLinuxコマンドの予定Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-22775361933237406782011-03-08T09:37:00.003+09:002011-06-14T09:58:31.832+09:00smartyで九九smartyで九九の表を作成<br />
<br />
kuku.php<br />
「../libs/Smarty.class.php」のパスは環境に合わせて調整が必要です。<br />
<pre class="prettyprint"><?php
/**
* Smarty問題
* 九々
* kuku.php - kuku.tpl
* @package smarty_lesson
* @author
* @since
*/
for ( $i = 1; $i <= 9; $i ++){
for ( $j = 1; $j <= 9; $j ++){
//2次元配列の作成
$num[$i][] = $i*$j;
}
}
require( "../libs/Smarty.class.php" );
$smarty = new Smarty();
$smarty -> assign( "num", $num );
$smarty -> display( "kuku.tpl" );
</pre><br />
kuku.tpl<br />
<pre class="prettyprint"><html>
<body>
<table border = "1">
<caption>【九九の表】</caption>
<tr><th width="30"><br></th>
{for $j=1 to 9}
<th width="70">
{$j}
</th>
{/for}
</tr>
{{foreach $num as $key1=>$row}}
<tr>
<th>{$key1}</th>
{{foreach $row as $key2=>$col}}
<td align=center>{$key1}*{$key2+1} = {$col}</td>
{/foreach}
</tr>
{/foreach}
</table>
</body>
</html>
</pre>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-1710371682534699914.post-31886775833587192162011-03-07T14:48:00.006+09:002011-06-14T10:00:03.390+09:00smartyで掲示板php講習 3/7 14週目<br />
<br />
・掃除はなんと雪でお休みでした。<br />
・今日までSmartyの予定でしたが、お休みが多い。<br />
・今日は4時間です。さらに、今週は水曜日がお休み<br />
<br />
<1時間目><br />
・<a href="http://ooyama3.blogspot.com/2011/06/smarty.html">九九の表をsmarty</a>で、今日はメールで送付しなくていい。<br />
九九の表の解説、2次元配列に値を入れる仕組みについて。<br />
smartyで、{foreach}を2重に記述する。(くわっちの例とは違うけど)<br />
<pre class="prettyprint">{{foreach $num as $key1=>$row}}
{{foreach $row as $key2=>$col}}
</pre>テーブルタグ<tr><td>の位置に注意<br />
ソースはメールで送付されました。<br />
・BBSの続き<br />
返信の出し方について、解説。<br />
コメントの出力が出ている人は、返信の出し方について、九九の表を参考に。<br />
テーブルを2つ使うときは、if文を使って条件判断をして出力する。<br />
<br />
<2時間目><br />
・BBSの続き、デバック<br />
(1)投稿のニックネームのリンクの表示がおかしい。テーブルタグは正しいが、表示のみ余分な文字列が付く。<br />
<a href="www.yahoo.co.jp">smarty</a> さんの投稿<br /><br />
→仕様? データにhttp://が付いていないとFirefoxが補完機能を働かせて?「http://localost/bbs_smarty/」を付ける<br />
(2)返信のニックネームの表示に余分な文字が付く<br />
→修正<br />
(3)emailが表示されない。<br />
→emailの保存/表示処理がない<br />
<br />
・くわっちの一言:テンプレートで出力を確認する際は、一度に全てのカラムを表示させるのでは<br />
なく、1つだけ表示して、うまくいったら他のカラムも表示する、という手順にしましょう。また、<br />
IF文など、複雑な部分も一旦とっぱらって、後からにしましょう。<br />
<br />
<3時間目><br />
・BBSの続き、デバック<br />
<br />
<4時間目><br />
・BBSの解説<br />
メールで資料が配布されているので、参照する。<br />
パラメータを1つで渡す方法と、2つで渡す方法があります。<br />
/imgフォルダの指定は、index.tplのhtmlタグで指定していますが、<br />
index.phpからの相対パスで、index.tplからの相対パスではありません。<br />
・comment.id = reply.comment_idの判断をどこでやるか。<br />
phpで多次元配列を作り、テンプレートに渡す。<br />
ロジックを書くのは、プログラマ。<br />
デザイナには負担はかけないほうがいい。<br />
・配布したソースでは、セッションの使い方など、今まで説明した機能はなるべく使っています。<br />
smartyの書き方の参考にして下さい。<br />
<br />
ごごは、すっかり雨もあがった。<br />
<br />
今日は、くわっちの最後の日でした。<br />
<br />
*サクラエディタでの<a href="http://memorva.jp/memo/windows/sakura_php_kwd_khp.php">phpの設定</a>についてUnknownnoreply@blogger.com1tag:blogger.com,1999:blog-1710371682534699914.post-12922561254323496832011-03-05T07:15:00.000+09:002011-06-14T07:15:47.061+09:00smartyでfizzbuzzsmartyでfizzbuzzを作ったサンプルです。<br />
<br />
fizzbuzz.php<br />
<pre class="prettyprint"><?php
/***
*
* phpで配列「num_list」に1~100までの整数をセット
* tplで「if」と「foreach」を使ってFIZZBUZZを表示
* 3の倍数はFIZZ
* 5の倍数はBUZZ
* 3と5の公倍数はFIZZBUZZ
* それ以外は数字を表示
*
*/
require("../libs/Smarty.class.php");
$smarty = new Smarty();
for ($i = 1; $i <= 100; $i++) {
$num_list[$i] = $i ;
}
$smarty -> assign("num_list", $num_list);
$smarty -> assign("fizz", "FIZZ");
$smarty -> assign("buzz", "BUZZ");
$smarty -> display("fizzbuzz.tpl");
?>
</pre><br />
fizzbuzz.tpl<br />
<pre class="prettyprint"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
{foreach from = $num_list item = num_i key = num}
{if $num is div by 3}
{if $num is div by 5}
{$fizz}{$buzz}<br />
{else}
{$fizz}<br />
{/if}
{else}
{if $num is div by 5}
{$buzz}<br />
{else}
{$num}<br />
{/if}
{/if}
{/foreach}
</body>
</html>
</pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-16144673948694904722011-03-04T17:40:00.005+09:002011-06-14T06:09:34.001+09:00smartyで掲示板<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></div><div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 3/4</span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・掃除も花粉症でお休みしました。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 今日は目が異常にかゆい。</span></div></div><div><1時間目></div>・今日もsmartyでfizzbuzz</div><div>半分以上は出来るまで、毎日続く?</div><div><br />
</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・今日もsmartyでfizzbuzzと解説</span></div><div>smartyのif,elseifはphpと処理が逆になっています。</div><div>phpは上から順に処理されますが、smartyはヒットした条件で処理されるので、</div><div>書き方の順は逆になります。</div>・九九の表</div><div><br />
</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3-5時間目></span></span></div>・BBSのindex.phpをsmartyで書き直す</div><div>2次元配列の2次元目を設定するところがわからなかった。<br />
1次元での例からの応用が利かない。頭が固くなってます。 </div><div>$row1['reply'][] = $row2;<br />
・実習の間に、PCのメモリ増設作業がありました。<br />
デスクトップはやったことあったけど、ノートは経験が無かったので、作業は<br />
委員長にお願いしました。ありがとうございます。</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><6時間目></span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・BBSのsubmit.phpをsmartyで書き直す</span></div>作業の残りは、3/7(月)にやってください。</div><div>なお、月曜日は4時間です。<br />
<br />
・smartyのテンプレートファイルをeclipseで書いていて不便だったので、<br />
せめて、<a href="http://wiki.r-tgw.net/index.php?Eclipse%E3%81%A7Smarty%E3%81%AEtpl%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E9%96%A2%E9%80%A3%E4%BB%98%E3%81%91%E3%82%8B">htmlファイル</a>とだけ関連付けしました。<br />
<br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-3064311480550519662011-03-03T18:09:00.008+09:002011-06-14T07:18:33.475+09:00smarty講習<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></span></div><div>php講習 3/3<br />
<br />
・掃除は花粉症でお休みしました。</div><div>今日は目が異常にかゆい。</div><div><br clear="none" /></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></div><div>・<a href="http://ooyama3.blogspot.com/2011/06/smartyfizzbuzz.html">smartyでfizzbuzz</a></div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・smartyでfizzbuzz、続き</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 出来ない人は16時半以降続きを。。。</span></div><div>・smartyで、smartyクラスの継承</div><div>デリミタの変更<br />
(デリミタ「{」「}」はjavascriptと競合する可能性があるので、そのままで使うことは<br />
あまりないとのこと)</div><div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3時間目></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・mysqlで環境設定</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> DB作成</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> Table作成</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・DBのtableからデータを取得(今までの復習)</span></span></span></div><div>・配列変数でのデータ取得</div><div>・テーブルの行データ取得を2次元配列で扱う<br />
行データは連想配列に入っているので、smartyでは、「.」(ドット)+「カラム名」で参照する。</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><4時間目></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・smarty課題の練習</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><5時間目></span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・smarty課題の練習、続き</span></span></span></span></div></div><div><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><6時間目></span></span></span></div><div>・smartyでlogin.phpとlogin.tplに分ける</div><div>phpの課題でもやっていた、phpとhtmlのタグを分ける作業の延長<br />
<br />
</div><div>「|escape」に関連し、default_modifiersのURL紹介があったので少し調べました。</div><div><a href="http://ganchiku.com/2006/03/smartydefault_modifiers.html">Smartyを使う際は、default_modifiersをセットしようぜ。訂正!バグあり。</a></div><div>この関数default_modifiersはなかなか曲者のようで、別の記事もありました。</div><div><br />
</div>・<a href="http://blog.asial.co.jp/309">Smartyのバグ ~default_modifiers~</a><br />
<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・</span><a href="http://nonn-et-twk.net/twk/node/133">Smartyでdefault_modifiers指定時に{debug}を使う方法</a></div><div><a href="http://nonn-et-twk.net/twk/node/133"><br />
</a></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Webでよく調べたらもっと出るのかもしれないし、</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">3.0.6になって改善されているかも</span>しれない。<br />
<br />
☆追記、escapeの除外方法<br />
smarty 2では、{$body|smarty:nodefaults}だったが、<br />
<a href="http://blog.yume-dia.jp/archives/142">smarty 3では、{$body nofilter}に変わったようです。</a><br />
日本語版マニュアルはまだですが、<a href="http://www.smarty.net/docs/en/variable.default.modifiers.tpl">英語版</a>には反映されています。</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-79492556890559169002011-03-02T16:53:00.006+09:002011-06-14T05:32:23.711+09:00smarty講習<div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 3/2</span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・掃除は雨でお休みでした。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・今日も雨だが、花粉症で目がかゆい。</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></span></div>・apacheのバーチャルホストの説明</div><div>httpd-vhosts.conf設定変更</div><div>設定は環境をlinuxで作ったときに行うので一度戻しましょう。</div><div><br />
</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・資料がメールで送付されたので、参照して下さい。</span></span></span></div>・PHPの基礎の話し。</div><div>・php.iniのerror_reportingについて</div><div>eclipseの変数表示、「緑の○」</div><div>この表示がない変数は定義されていない(目安になる)</div><div>連想配列$_POSTの事前定義は、冗長になるので「@」を付ける</div><div>エラーの原因がわかっている場合のみ使用可能。</div><div>・現場の状況によって使い分ける。</div><div>全部宣言すると、javaと同じになり、phpのメリットがない。<br />
ちなみに、php.iniのerror_reporting設定はphpスクリプトの<a href="http://jp.php.net/manual/ja/function.error-reporting.php">関数</a>でも実行できるみたい。</div><div><pre class="prettyprint">error_reporting(E_ALL);
</pre><br />
</div><div>・サーバ上のフォルダにindex.phpがないとき、ディレクトリが見えてしまう。</div><div>公開するサーバではまずいので、linuxの環境を作ったとき設定をします。</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・smartyの話し。</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・再度メールで資料が2件送付されています。</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 昨日同様に資料を展開して、フォルダーをプロジェクトに。</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><4時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・課題1、2の説明と、練習</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 代入文</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> if文</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><5時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・課題3の説明、{foreach}</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・セレクト部品の処理をsmartyで書く</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><6時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・セレクト部品の処理をsmartyで書く(</span></span></span></span></span>続き)</div><div>ブラウザ?でキャッシュされているため、selectを変更したあと</div><div>画面をリフレッシュしても、現在の日付に戻らなかった。</div><div>毎回画面を閉じて、開きなおすと動いた。</div><div><br />
</div><div>・明日は、smartyでDBの処理だそうです。</div><div>・また、smartyは今週で終わりで、来週からlinuxだそうです。</div><div>そのlinuxも数日で、次がsymfonyの予定だそうです。</div><div>メモリは間に合ったのだろうか?</div><div><br />
</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-59769739852099517882011-03-01T17:11:00.019+09:002012-07-19T11:24:43.514+09:00xampp環境にsmartyインストール、環境設定<div>
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></div>
<div>
訓練記録 3/1<br />
<br />
・今日から3月です。訓練も半分終わってしまいました。</div>
<div>
・掃除は雨でお休みでした。</div>
<div>
<br /></div>
<div>
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></div>
<div>
・昨日のclassサンプルプログラム修正版がメールで送付されたので差し替え</div>
<div>
・クラス、オブジェクト指向、テンプレートエンジンの説明用資料配布、内容の説明</div>
<div>
<br /></div>
<div>
・UMLでの開発について</div>
<div>
大規模なシステムの場合、パーツに分けてそれぞれ担当が開発する。</div>
<div>
<br /></div>
<div>
・MVCモデル、テンプレートエンジン</div>
<div>
モデル </div>
<div>
ビュー </div>
<div>
コントローラ </div>
<div>
<a href="http://www.smarty.net/docsv2/ja/">smarty</a>はビューの部分を切り離すもの</div>
<div>
モデルは自分で作らなくてはならない。</div>
<div>
</div>
<div>
・PHP開発者は、ほぼsmartyは経験している。</div>
<div>
それ以降、フレームワークはそれぞれの会社等で使っているものを使用。</div>
<div>
<br /></div>
<div>
・PHPフレームワーク、3大フレームワーク</div>
<div>
Zend,Symfony,Cake</div>
<div>
開発の仕事をするためには、いずれか1つ使いこなしていることは必要。<br />
<a href="http://www.google.co.jp/trends?q=%2CCakePHP%2Csymfony%2CZend+Framework&ctab=0&geo=all&date=all&sort=0">googleトレンド</a>にてシェアを見てみる。</div>
<div>
<div>
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・開発する場合、現場では使用するフレームワークは用意されている。</span></div>
</div>
<div>
・過去の案件でメンテナンスする場合もあるが、大きい開発の場合、</div>
<div>
smartyは使わない。</div>
<div>
・カスタマイズになった場合、フレームワークは選べない。</div>
<div>
<br /></div>
<div>
・phpメーリングリスト</div>
<div>
登録することをお勧め。</div>
<div>
phpで判らないことがあったとき、ここの過去ログにたどり着くことが多い。</div>
<div>
メールは、毎回受け取るよりは、毎日1回にしておくことをお勧め。</div>
<div>
<br /></div>
<div>
・<a href="http://events.php.gr.jp/">event php</a></div>
<div>
phpの開発者も参加している。(はてなのユーザIDでもログインできます)<br />
<br />
以下、Webのテキストを参考に作業(xampp環境にインストール)</div>
<div>
</div>
<div>
<a href="http://www.smarty.net/download">・smarty(3.0.7)インストール</a><br />
(このサイトでマニュアルもダウンロードできますが、オンラインでも見れます)<br />
smarty用のプロジェクトを作成 </div>
<div>
<a href="http://www.smarty.net/download"><br />
</a></div>
<div>
・apacheの<a href="http://httpd.apache.org/docs/2.2/vhosts/">バーチャルホストの設定</a></div>
<div>
C:\pleiades\xampp\apache\conf\extra\httpd-vhosts.conf</div>
<div>
### Smarty サンプル ###<br />
<VirtualHost *:80></div>
<div>
ホストのIP設定(windows)</div>
<div>
C:\WINDOWS\system32\drivers\etc\hosts</div>
<div>
127.0.0.1 Smarty_sample</div>
<div>
<br /></div>
<div>
キーワード検索(時間のある人は調べておく)</div>
<div>
・バーチャルホスト</div>
<div>
・hostsファイル</div>
<div>
・127.0.0.1</div>
<div>
・localhost</div>
<div>
・名前解決</div>
<div>
・<a href="http://www.nic.ad.jp/ja/dom/system.html">dns</a></div>
<div>
・nslookup</div>
<div>
・Webアプリ</div>
<div>
・get/put<br />
・キャッシュ(cashとcacheは違います)</div>
<div>
・サーバサイド(スクリプト)</div>
<div>
・クライアントサイド(スクリプト)<br />
ちなみにphpは<a href="http://safe-linux.homeip.net/Server_Rental/function/web/script.html">サーバサイドスクリプト</a></div>
<div>
<br /></div>
<div>
・<a href="http://www.smarty.net/docs/ja/installing.smarty.basic.tpl">smartyの環境設定</a>(フォルダ作成:Example 2.5、Example 2.9参照)</div>
<div>
* templates<br />
* templates_c<br />
* config<br />
* cache</div>
<div>
<br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・<a href="http://www.phpbook.jp/smarty/">smartyのリンク</a></span> (初心者向け自己学習の参考にして)<br />
・<a href="http://www.phppro.jp/school/smarty/">smartyのリンク</a> (その2)<br />
<br /></div>
<div>
・smartyファイル作成</div>
<div>
<a href="http://ooyama3.blogspot.com/2012/07/hellophphellotpl.html">hello.php</a>(smartyのテンプレート呼び出し)</div>
<div>
<a href="http://ooyama3.blogspot.com/2012/07/hellophphellotpl.html">hello.tpl</a>(smartyのテンプレート、templatesフォルダへ入れる)<br />
テンプレートファイルの拡張子は「.tpl」を使いましょう。</div>
<div>
<br /></div>
<div>
・smartyソース(hello.php)の解説</div>
<div>
ライブラリ(libs)</div>
<div>
テンプレートディレクトリ(template_dir)</div>
<div>
コンパイルディレクトリ(compile_dir)<br />
phpと違って、変数名?の先頭に$は付かなくてもいい? </div>
<div>
<br /></div>
<div>
・セキュリティ上問題があるので、今回作成したディレクトリは通常サーバの<br />
公開されるディレクトリには置かない。</div>
<div>
(公開領域(htdocフォルダ内)には、smarty関連フォルダは置かない)</div>
<div>
<br /></div>
<div>
・smarty 配列変数での出力<br />
<a href="http://ja.wikipedia.org/wiki/JavaServer_Pages">JSP</a><br />
<br />
* 何回も更新してごめんなさい。思い出しながら書いてます。</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-36845664120908739222011-02-28T17:30:00.004+09:002011-06-13T10:55:23.626+09:00phpクラスとエラーレベル<div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 2/28 13週目</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div>・掃除は雨でお休みでした。</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・今日からSmartyの予定でしたが、クラスの説明で1日かかった。</span></span></div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・担当の先生が変わったため、個別に先生と面談(金曜日の続き)</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・面談の終わった人は、掲示板の課題。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> テキストの掲示板がある人は、クラス、オブジェクト指向の課題をメーリングリストで</span>送ります。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・<a href="http://ooyama3.blogspot.com/2010/12/1221.html">クラスについて</a>は、12/20-21にやってるが内容をすっかり忘れてました。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・クラスの記述では、クラスを定義するファイルは別に作成し呼び出す(include)ようにする。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> (いままでの課題などでは1つのphpファイルに記述していた)</span></div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・クラスファイルの命名規則、クラス名を最初大文字してそのあと</span><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">「class」</span>を付ける</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> Human.class.php</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> Dog.class.php</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・メールで送付された課題の練習</span></div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3-6時間目></span></span></span></span></div><div>・課題の練習と解説</div><div><br />
</div>・php.iniで文字列検索「<a href="http://jp.php.net/manual/ja/errorfunc.configuration.php#ini.error-reporting">error_reporting</a>」</div><div>error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED </div><div>↓<br />
error_reporting = <a href="http://www.ecoop.net/memo/2008-07-09-1.html">E_ALL</a></div><div>実際の開発では、エラーが出ているものは全てつぶす</div><div>今までの説明では、ワーニングでもエラーにせずに済ませていた。</div><div>・開発時はエラーをつぶすためonにする。</div><div>本番サーバでは、攻撃のヒントになるのでoffにしている。</div><div>レンタルサーバでは、php.iniファイルは設定できないので、ini_set()で設定する。</div><div>・この講習では、php.iniを元に戻す。</div><div></div><div>・アクセス修飾子(<a href="http://jp.php.net/manual/ja/language.oop5.visibility.php">アクセス権</a>)</div><div>public クラスの外からも参照可能</div><div>private クラス自身からの参照のみ</div><div>protected クラス自身と継承したクラスから参照可能</div><div>概念の話しなので、実際にプログラムと動きを見る方がわかりやすい。</div><div></div><div>・クラスのはなし、継承から。</div><div>継承は、symfonyで使う。使ううちに判ってくる。</div><div></div><div><br />
</div><div>・クラス図で検索するとクラスを図にしたものの説明がある。</div><div><br />
</div><div>・住所録、login.php</div><div>テーブルの内容を読んだら、デバック中は配列(レコード)の内容を確認しておく。</div><div></div><div>・明日からsmarty、Webテキストの拡張2の状態から始めます。</div><div>出来ていない人は準備しておいて下さい。</div><div>(おそらく、1月に先生からメールで配布されていたはず)</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-1710371682534699914.post-29533058500500639002011-02-25T17:02:00.006+09:002011-06-13T10:52:00.450+09:00php住所録作成、セッション<div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 2/25</span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・今日はいい天気です。</span></div><div>花粉症で目が痒い、掃除はお休みしました。</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></span></div><div>・今日も課題の作成なし</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張の続き(今日までの予定)</span></div><div>テスト項目の整理</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張の続き</span></span></div><div>テスト、動作確認</div><div>一般ユーザで表示が消えない</div><div>→記述の間違い </div><div><pre class="prettyprint">if ($login_authority=2) {
↓
if ($login_authority==2) {
</pre><div>パスワードチェックで半角英数のエラーが出ない </div><div>→ ログイン画面で関数を呼んでいなかった</div><div>ログオン画面への戻りでエラーが表示されるときがある</div><div>→ タイムアウトのとき、外部変数のエラーが出る</div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3時間目></span></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張の続き</span></span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> ログオン画面への戻りでエラーが表示されるときがある</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> → タイムアウトのとき、外部変数のエラーが出る</span></div>引き続き調査中、Webにあるエラーの対策をいくつか試みたがいずれも効果なし</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><4時間目></span></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張</span></span></span></span></span></div><div>ログオン画面とセッションコントロールの説明</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><5-6時間目></span></span></span></span></span></div><div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張</span></span></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> → タイムアウトのとき、外部変数のエラーが出る</span></div>セッションの関数を変更したら、エラーになった。戻すと出ない。</div><div>Webで調べたら<a href="http://hamoblo.com/simple-eye/index.php?type=1&entryId=6">資料</a>があった、phpのバグらしい。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">($_SESSIONのキーとグローバル変数が同じ場合で、<br />
その$_SESSIONが外部からグローバル変数とは関係ない外部変数を<br />
別のグローバル変数を介して受け取っている場合)<br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></span></span><br />
<pre class="prettyprint"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">session_start();
$aaa = 'abc';
$bbb = $_GET['abc'];
$_SESSION['aaa'] = $bbb;
</span></span></span></pre><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
・変数名を変更して対応</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 上の例だと$aaa --> $aabに相当</span></span></span></span></span><br />
<br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・来週から、smartyの予定</span></span></span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> クラスのことがよく判っていない状況でデバックが出来るものだろうか。</span></span></span></span></span></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-19319444763363431192011-02-24T17:14:00.006+09:002011-06-13T11:04:47.740+09:00php住所録作成、ユーザ登録(削除)<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 2/24</span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・今日は雨で、掃除はお休みしました。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・少し暖かくなってきました。今日は手袋をしなくても寒くない。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> でも、朝起きるのがつらくなる。花粉症で熟睡出来ていないようだ。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></span></div><div>・今日も課題の作成なし</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張の続き(2/25(金)までに伸びた)</span></div><div>・#5 ユーザの登録、変更、削除</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ新規情報完了画面 user_insert_complete.php </span></span></div><div>→パスワード入力が漏れていたので、入力、編集画面から訂正</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ新規情報完了画面 user_insert_complete.php </span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ情報削除確認画面 user_delete_confirm.php </span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> →デバック中、パラメータが渡っていない</span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ情報編集画面 user_update.php </span></span></div>→削除へのボタンがなかった</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3時間目></span></span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ情報削除完了画面 user_delete_complete.php </span></div>→デバック中</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><4時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ情報削除完了画面 user_delete_complete.php </span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">入力チェックと、チェックの関数化</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> →入力チェックの関数1つをつくるのがやっと</span></div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><5時間目></span></span></span></span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">チェックの関数化</span></span></div>→作業中</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><6時間目></span></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">チェックの関数化、合わせて7個になった。</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 練習だから、使えるものは使いまわすけど、実際に運用にするなら、</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">あんまり使いまわすとメンテナンスのとき面倒になる。</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">今までのシステムなら、ハードの減価償却とかもからんで、</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">一度作ると3~5年かそれ以上使うことになっていたけど、</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Webの世界はどうなんだろう。</span></span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-70031350928932077312011-02-22T16:55:00.005+09:002011-06-13T10:44:56.405+09:00php住所録作成、ユーザ登録<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 2/22</span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・花粉症の症状が本格的に出てきたので、掃除はお休みしました。</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></span></div><div>・今日は課題の作成なし</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張の続き(2/24(木)まで?)</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・#5 ユーザの登録、変更、削除</span></span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> とりあえずファイルだけ作った </span></span></div><div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></span></div><div>ユーザ情報一覧表示画面 user_info.php MV<br />
ユーザ情報編集画面 user_update.php MV</div><div><br />
<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3時間目></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ情報編集確認画面 user_update_confirm.php MV</span></div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> →デバック</span></div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><4時間目></span></div></div><div>ユーザ情報編集確認画面 user_update_confirm.php MV</div><div>→なんとか動くようになった、入力チェックは一部のみ実施 </div><div>ユーザ情報編集完了画面 user_update_complete.php MV</div><div>→デバック</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><5時間目></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ情報編集完了画面 user_update_complete.php MV</span></div><div>ユーザ新規情報入力画面 user_insert.php MV</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">ユーザ新規情報確認画面 user_insert_confirm.php MV</span><br />
<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> →</span>入力チェックは一部のみ実施<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><6時間目></span></span></span></span></div><div>ユーザ新規情報完了画面 user_insert_complete.php MV</div><div>→作業中</div><br />
終わらなかった、あと、チェックの関数化で整理もしたい。<br />
全体にチェックが甘いのでとりあえず動く程度。 <br />
ちなみに、明日は訓練お休みです。Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-68127593990266637912011-02-21T17:05:00.003+09:002011-06-13T10:43:38.604+09:00php住所録作成、管理画面<div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">php講習 2/21 12週目</span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・昨日から花粉症か、目が痒くなってます。</span></span></div><div>・掃除は東浜でした。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></div><div>・今日は課題の作成なし</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録、機能拡張の続き(2/24(木)まで)</span></div></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2-6時間目></span></span></span></span></div><div>・「session_start() ;」を使う上での作業の注意</div><div>コマンドを発行する前に出力があると、うまく動かない。</div><div>デバック出力、htmlタグなどが出ていることがあるので注意。</div><div></div><div>・住所録の編集画面からの画面遷移を確認</div><div>・#3 管理者権限のチェックを追加</div><div>(一般ユーザ権限での画面レイアウト調整)</div><div>・#4 パスワード変更</div><div>メニュー画面からの呼び出し</div><div>変更画面(upass_update.php)</div><div>変更完了画面(upass_update_complete.php)</div><div><br />
</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・「WEBテキスト」の連絡がメールであったので見てました。</span></div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-2609769811463375472011-02-19T11:12:00.001+09:002011-06-21T11:14:41.680+09:00県でfizzbuzz課題の県名一覧でfizzbuzzのphpコードです。<br />
地域コードを使うために色を付けていますが、phpコードの主要部分は県名一覧と同じです。<br />
なお、県コード一覧(pref.php)はincludeしています。<br />
<br />
<pre class="prettyprint"><?php
/**
*
* 47都道府県を1~47の都道府県コードと配列キーが
* 対象になるように、配列変数「$pref」に格納して下さい。
* なお、3の倍数のときはFIZZ県と表示
* 5の倍数のときはBUZZ県と表示(公倍数ならFIZZBUZZ県と表示)
*
* @var 1.0.0
* @since 2011/2/18
* @author
*
*/
include_once 'pref.php';
$pref2 = array(
'1' => '1', // 北海道
'2' => '2', // 青森県
'3' => '2', // 岩手県
'4' => '2', // 宮城県
'5' => '2', // 秋田県
'6' => '2', // 山形県
'7' => '2', // 福島県
'8' => '3', // 茨城県
'9' => '3', // 栃木県
'10' => '3', // 群馬県
'11' => '3', // 埼玉県
'12' => '3', // 千葉県
'13' => '3', // 東京都
'14' => '3', // 神奈川県
'15' => '4', // 新潟県
'16' => '4', // 富山県
'17' => '4', // 石川県
'18' => '4', // 福井県
'19' => '4', // 山梨県
'20' => '4', // 長野県
'21' => '4', // 岐阜県
'22' => '4', // 静岡県
'23' => '4', // 愛知県
'24' => '5', // 三重県
'25' => '5', // 滋賀県
'26' => '5', // 京都府
'27' => '5', // 大阪府
'28' => '5', // 兵庫県
'29' => '5', // 奈良県
'30' => '5', // 和歌山県
'31' => '6', // 鳥取県
'32' => '6', // 島根県
'33' => '6', // 岡山県
'34' => '6', // 広島県
'35' => '6', // 山口県
'36' => '7', // 徳島県
'37' => '7', // 香川県
'38' => '7', // 愛媛県
'39' => '7', // 高知県
'40' => '8', // 福岡県
'41' => '8', // 佐賀県
'42' => '8', // 長崎県
'43' => '8', // 熊本県
'44' => '8', // 大分県
'45' => '8', // 宮崎県
'46' => '8', // 鹿児島県
'47' => '8'); // 沖縄県
$pref_col = array( '1' => '#CCFFCC',
'2' => '#99FF99',
'3' => '#9999FF',
'4' => '#CCFFFF',
'5' => '#FFCC00',
'6' => '#FFFF99',
'7' => '#FFCCCC',
'8' => '#FF66FF' );
?>
<html>
<head>
<title>pref</title>
<style type="text/css">
table, tr, th, td {
border-collapse: collapse;
border: 1px #808080 solid;
}
</style>
</head>
<body>
<table border="1" align="center">
<caption>【県名一覧】</caption>
<tr><th bgcolor=#00ffcc>県コード</th><th bgcolor=#00ffcc>県名</th></tr>
<?php foreach ($prefAry as $key => $value) { ?>
<?php $str = "" ; ?>
<tr>
<td align="center" bgcolor=<?php echo $pref_col[$pref2[$key]] ?>>
<?php print $key; ?>
</td><td align="left" bgcolor=<?php echo $pref_col[$pref2[$key]] ?>>
<?php if (($key %3) == 0) { $str .= "FIZZ" ; } ?>
<?php if (($key %5) == 0) { $str .= "BUZZ" ; } ?>
<?php if ($str == "" ) { print $value; } else { print $str ; } ?>
</td>
</tr>
<?php } ?>
</table>
</body>
</html>
</pre>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-55457462902153182492011-02-18T18:13:00.007+09:002011-06-21T11:17:20.476+09:00php住所録作成、セッション、クッキ-<div>php講習 2/18<br />
<br />
・今日は、雨のあとで掃除は中止でした。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></div><div>・朝の脳体操、<a href="http://ooyama3.blogspot.com/2011/06/fizzbuzz_21.html">県でfizzbuzz</a></div><div>47都道府県の都道府県コードと都道府県名を通常配列「$pref」に入れる。</div><div>以下、問題を写しきれなかったので概要。</div><div>47都道府県を1~47の都道府県コードと配列キーが<br />
対象になるように、配列変数「$pref」に格納<br />
なお、3の倍数のときはFIZZ県と表示<br />
5の倍数のときはBUZZ県と表示(公倍数ならFIZZBUZZ県と表示)</div><div><br />
</div><div>・メールで、資料が送付されているので、昨日と同様に「hpdoc」に入れて</div><div>フォルダ名をsession2に変更し、プロジェクトを作成する。</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・<a href="http://e-words.jp/w/E382AFE38383E382ADE383BC.html">クッキー</a>の復習</span></span></div><div>ブラウザとサーバでpost,getしているようなもの。</div><div>サンプルコードcoockie.phpで、htmlspecialcharsに第3パラメータ「'UTF-8'」を追加。</div><div>・「session1.php」「session2.php」「session3.php」を使って、セッションの仕組みを体験</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3時間目></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・「session1.php」「session2.php」「session3.php」を使って、セッションの仕組みを体験(続き)</span></div>・MVCモデル<br />
<div><div>・コントローラ</div><div>ページの遷移をコントロールあえて言えば(session2.php)</div>・課題、住所録拡張機能(ログイン機能)</div><div>仕様書の赤:必ず、</div><div>青:できれば</div><div>黒:出来る人は</div>画面推移のオレンジの箱:画面は存在しない、プログラム上のみ<br />
<div>ログイン判定を全画面に適用:requireさせる</div><div>コントローラのソースコード例、コードの意味を理解して一部修正して使用する。</div><div>(そのままでは使えません)</div><div>プロジェクトの下に「ctr」フォルダを作ってそこにコントローラのphpファイルを入れる。</div><div>期間:2/22(来週の火曜日)まで</div><div>userテーブルのプライマリキーはidを付け、int型で作る</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><4-6時間目></span></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・</span></span></span>住所録拡張機能(ログイン機能)の追加作業</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 作業は、テーブルを作るところから。</span></div><div>・クッキーで5分の設定をするが、各画面を開けたときにも5分を設定。</div>・最低でも以下のファイル構成は作っておく</div><div>login.php</div><div>menu.php</div><div>./ctr/login_ctr.php</div><div>logout.ctr.php</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・ログイン画面を作って、ctr.phpを作ろうとしたところで時間になった。</span></span></span></div><div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1710371682534699914.post-79847062624619143202011-02-17T17:18:00.007+09:002011-06-13T10:42:31.358+09:00php住所録作成、コードの解説<div>php講習 2/17<br />
<br />
・掃除は東浜でした。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><1時間目></span></div><div>・課題は、県名の一覧作成。</div><div>今日は3の倍数を表示。</div><div><br />
</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><2時間目></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・欠席が多くなってしまったので、とりあえず自習になりました。</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><3ー6時間目></span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">・住所録</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> メールで送付された住所録プログラムの解説</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 資料は解凍したら、htdocフォルダの中に</span></span><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">「</span></span>address_book2」を<span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">フォルダーごとコピー</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> eclipseでプロジェクト「</span></span>address_book2」を作成すると、メッセージ</div><div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 「指定した外部のロケーションは既に存在します。プロジェクトが。。。」が</span></div>表示されるが、そのままOK。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 「</span></span>db_connect.php」のDB接続情報は各自の環境に合わせる。</div><div>「lib」フォルダにincludeファイルがあります。</div><div>「css」フォルダにスタイルシートファイルがあります。</div><div>テーブルがの枠が2重になるのを防いでいます。</div><div>border-collapse: collapse;</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 「index.php」から順に説明。</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> </span></span>文字コードの指定が出来るところは、なるべく指定をする。</div><div>指定をしないと、動く場合もあるが、環境によって動きが異なるときがある。</div><div>mb_strlen($disp_sei, UTF8)</div><div>「$error_msg["sei"]」メッセージは、それぞれ変数に入れている人もいるが、</div><div>まとめて扱いたいので、配列にしています。</div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br />
</span></span></div><div><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span style="border-collapse: separate; color: black; font-family: Tahoma; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"> 以下、途中省略。。。</span></span></div><div><br />
</div><div>「insert_confirm.php」の「submit」ボタンは「登録する」に変更</div><div>「update.php」にある、sessionの2行は削除</div><div>「mysql_fetch_assoc」は、連想配列で結果を受け取る</div><div>各自が作成した住所録も、updateはinsertができていれば、少し変更して出来る。</div><div><br />
</div><div>その他、メールにもコメントがあるので対応する。</div><div>今後、ログイン画面を作る。</div><div></div><div>残りの時間は、住所録の見直し。</div><div><br />
<eclipse上のphpソースの変数名の表示設定について><br />
ウインドウメニューから設定を選択<br />
開いた設定画面にて、PHP/エディタ/構文の色指定を選ぶ。<br />
構文要素で変数/前景をクリック、色の指定変更が可能。<br />
依然のバージョンは茶色だったが、個人の好みで何色でもいいので指定。<br />
eclipse 3.5と最新の3.6では設定が変わっているという話しがあります。<br />
<br />
書くと判りにくいけど、eclipseで操作すれば簡単。</div>Unknownnoreply@blogger.com0