반응형 PHP2 PHP 템플릿 클래스 사용 간단한 설명은 다음과 같습니다. 먼저 기존의 코딩 방법 입니다. # 파일명 : index.html for($i=0;$i=200;$i++) { echo "$i "; } ?> 식으로 제작 하였습니다. 이경우 위에 애기한 데로. 나중에 디자인 수정시에는 프로그래머와 디자인너가 작업을 둘이서 해야 했습니다,. Templite를 이요하면 다름과 같이 쓰여 집니다. # 파일명 : index.html include("class.FastTemplate.php"); $tpl = new FastTemplate("./templates"); $tpl->define( array( main => "index.tpl", ) ); for($i=0;$i=200;$i++) { $temp .= "$i "; } $tpl->assign( a.. 2009. 7. 7. PHP mysql 연동 $dbId = "test";$dbPassword = "12345";$dbName = "test";$conn = mysql_connect('localhost', $dbId, $dbPassword);if (!$conn) {die('Could not connect: ' . mysql_error());}$selectDB = mysql_select_db($dbName, $conn);if(!selectDB) {echo("데이터베이스 에러");exit;}//mysql_query("set character set euckr");$query = "SELECT * FROM mem";$result = mysql_query($query,$conn) or die("잘못된 퀴리문입니다");while ($row = mysql_f.. 2009. 7. 7. 이전 1 다음 728x90 반응형