ダウンロード

http://www.php.net/downloads.php PHPダウンロード

サンプルコード

htmlのなかに直接記述できるのがPHPの利点ですね。
<?php
//変数をセット
$a = 1;
echo $a;
?>

SMARTY

テンプレートエンジン。 http://www.smarty.net/
php.ini
include_path = ".:/usr/local/lib/php/Smarty"

Setup.php

/public_html/common/setup.php
<?php
require('Smarty.class.php') ;
class Smarty_sample extends Smarty {
function Smarty_sample() 
{
$this->Smarty();
$this->template_dir = '/home/sample/Smarty/templates/';
$this->compile_dir = '/home/sample/Smarty/templates_c/';
$this->config_dir = '/home/sample/Smarty/configs/';
$this->cache_dir = '/home/sample/Smarty/cache/';
}
?>

メインプログラム

/public_html/test.php
<?php
require_once('common/setup.php');
$smarty = new Smarty_sample;
$text = "Hello, World";
$smarty->assign("text",$text);
$smarty->display('test.html');
?>

テンプレート

/Smarty/templates/test.html
<html>
<head>
</head>
<body>
<font>
{$text}
</font>
</body>
</html>
php cms

cakePHP

フレームワーク

http://cakephp.jp/

XAMPP

Apache+MySQL+PHPその他のオールインワン・パッケージ

http://www.apachefriends.org/jp/xampp-windows.html

PHP

  1. ダウンロード
  2. サンプルコード
  3. SMARTY
  4. Setup.php
  5. メインプログラム
  6. テンプレート
  7. cakePHP
  8. XAMPP
  9. ▼ サイトマップ
Webサイト作成の仕事を依頼する
Twitter@tachiss

VideoGames|DS VideoGames|PSP VideoGames|PlayStation3 VideoGames|XBOX VideoGames|任天堂 VideoGames|エニックス
v