070-8260-2526

9 ~ 6

352-0331-1626-83

:ũڸ


ֹ
Ȩ > > ֹ

ȸ 10567
״ε۰

[״] ø

״ 2013/01/12 22:37





״ ׽Ʈ ϳ 鼭 Ʈ Ϸ صӴϴ.



״带 ٿ޾Ƽ Ǯ εϰ ġϴ ϴ.

׸, ԽǸ Ǿ ġ ū CMS ʰ ϴ.


ҽ , Խ ȸ ʿ ϵ bbs 丮 Ʒ ְ, ׿ 丮 ʿ ϵ ֽϴ.


ġϰ Ÿ ù, index.php 캸, ο ˴ϴ.


, index.php 丮 ο , a.php ϳ ٰ սô.


׷, Ʒ ״ ٿְ ϸ ˴ϴ.



<?
include_once("./_common.php");

$g4[title] = " ŸƲ";
include_once("./_head.php");
?>




<?php

include_once("./_tail.php");

?>
 



κп phpڵ峪 html ڵ带 ʿѸŭ ۼϸ ǰڽϴ.



״ ҽ 丮 캸, index.php ִ 丮 _common.php _head.php, _tail.php ֽϴ.


_common.php , Ʒ ϴ.



<?
$g4_path = "."; // common.php
include_once("$g4_path/common.php");
?>



ִ common.php ε, _common.php ġ ְ ԽŰ ϰ ֽϴ.

common.php , Լ ǿ Բ Ʒ ϵ ԽŰ ϰ ֽϴ.




include_once("$g4[path]/lib/constant.php");  //
include_once("$g4[path]/config.php");  //
include_once("$g4[path]/lib/common.lib.php"); // ̺귯



_head.php 쵵 head.php ԽŰ ۼǾ ֽϴ.


head.php , Ʒ ٸ ϵ ԽŰ κ մϴ.




include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");



2° Ϻʹ ״ ̺귯 ϵԴϴٸ, ù° head.sub.php ڰ ִ κ ִ Դϴ.


ƽôٽ, html <head>κа <body>κ ֽϴ.

head  κ 뿡 ʿ ϰ ǰ, ȭ鿡 ̴ κ body ±װ ϰ .


head.php ȿ ԵǾ ִ head.sub.php body ±׸ κб ۼǾ ְ, head.php include_once ڿ ȭ鿡 ǥõ ۵˴ϴ. Ʈ ޴, ̵ ְ.


Ʈ պκ ó ̷, Ը ° ۼϸ ˴ϴ. Ҹ κ.


κ ۼ , Ʈ ϴ κ ԽŰ ۼմϴ.

include_once("./_tail.php"); κԴϴ.


_tail.php , tail.php ϵ ۼǾ ֽϴ.

tail.php , 


ϴ ۼ Ŀ tail.sub.php ԽŰ ۼǾ ֽϴ.

ǪͶ ϴ, ϴܿ ġ ۼϰ tail.sub.php ԽŰ ۼմϴ.


tail.sub.php , <body>±׸ ݰ, <html> ±׸ ݴ κ Դϴ. ڿ Ÿ php ڵ尡 ڸϰ ֳ׿.


ȭ鿡 ܿ ڸϴ ϸ, 

head.php ۼָ ǰ, 


ϴܿ ڸϴ , Ǫʹ tail.php ۼָ ǰڽϴ.


index.php 丮 ϴ a.php ۼ ؼ ˾ƺýϴ.


޴? ɺ, 丮 ־ΰ ϴµ,  , ̷ 丮 ϳ ȿ ۼ 쿡  ޶? 


׶ ø ֽϴ. ٸ, ϵ ԽŰ κп ο . ذϴ _common.php _head.php, _tail.php Դϴ.


丮 b.php a.php غսô.


׸, _common.php _head.php, _tail.php index.php ϰ 丮 ִ ͵ ״ ؼ b.php ġ ־ ݽô.

׸, _common.php  $g4_path ָ ˴ϴ.



$g4_path = ".."; // common.php


common.php b.php ִ 丮 丮 ϱ, η ΰ ָ ˴ϴ.


ϰ index.php Ȱϴ.


丮 ø ΰ ᵵ ǰڱ.