PHP 雛形規定

  基本セット




  • control.php

    処理の概要が記述される、開始ソースコード

  • model.php

    処理の詳細が記述される、ユーザ関数ソースコード

    [注意]
    例外を除いて、 「print」処理は行ってはならない

  • view.php

    画面部分の記述を HTMLとJavaScript で行い、
    PHP変数を埋め込む事で「動的ページ」を作成する。

    例外的には、ループによる「非埋込型」になる事はありえますが、指示の無い限り使用してはいけません

    画面単位に In(n) というプリフィックスを 入力項目の名前に付けて下さい。n は画面番号です

    (例) In1Key




  •   拡張セット




  • common.php

    共有する価値のある「関数」または「クラス」をまとめたもの
    (php.ini の include_path に書かれたディレクトリに保存して共有して使用)

  • db.php

    データベースに対する処理を標準化した「クラス」
    (php.ini の include_path に書かれたディレクトリに保存して共有して使用)




  •   雛形ファイル作成スクリプト

    アプリケーション作成フォルダに置いて、エクスプローラからダブルクリックして実行させて下さい

    create_sk.vbs
      
    ' ***********************************************************
    ' オブジェクトを作成
    ' ***********************************************************
    Set Fso = CreateObject( "Scripting.FileSystemObject" )
    
    ' ***********************************************************
    ' 処理開始
    ' ***********************************************************
    strTarget = "frame.htm"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
    strTarget = "control.php"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
    strTarget = "model.php"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
    strTarget = "view.php"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
    strTarget = "view2.php"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
    strTarget = "viewmessage.php"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
    strTarget = "style.css"
    if not Fso.FileExists( strTarget ) then
    	Set MyFile = Fso.CreateTextFile( strTarget )
    	MyFile.Close
    end if
    
      



      style.css

      
    TH {
    	font-family: Verdana,'MS Pゴシック';
    	font-size: 12px;
    }
    
    TD {
    	font-family: Verdana,'MS Pゴシック';
    	font-size: 12px;
    }
    
      










      infoboard   管理者用   
    このエントリーをはてなブックマークに追加





    フリーフォントWEBサービス
    SQLの窓WEBサービス

    SQLの窓フリーソフト

    素材

    一般WEBツールリンク

    SQLの窓

    フリーソフト

    JSライブラリ