묻고답하기
write_form.html에서도 php코드가 먹게끔 처리요~^^;;
2015.12.03 19:05
xe_document 에서여
/modules/board/skins/sketchbook5._reply/
폴더의 write_form.html 파일내용은 아래와 같이 했는대여...
하단쪽에 보면
<? include $_SERVER[DOCUMENT_ROOT]."/files/config/db.config.php" ?>
<?php
$link = mysql_connect($db_info->localhost, $db_info->hso5321, $db_info->ghkdtjrdls2);
$dbname = "hso5321_godohosting_com";
$tablename = "xe_member";
mysql_select_db($dbname, $link);
$query = "select * from xe_member where user_id != 'webmaster'";
mysql_query("set names utf8;");
$result = mysql_query($query, $link);
$num_results = mysql_num_rows($result);
?>
식으로 html안에 php코드를 적용했는대 안되내여...
html에서도 php코드가 먹게끔 처리했는데여요^^;;
윽 php코드 먹게 할려면 어떻게 해야 되나여?^^;;
-------------------------
<include target="_header.html" />
<script>//<![CDATA[
var msg_kr_address = '{$lang->msg_kr_address}';
var msg_kr_address_etc = '{$lang->msg_kr_address_etc}';
//]]></script>
<load target="js/editor.js" type="body" />
<include cond="Mobile::isMobileCheckByAgent()" target="_write_form_mobile.html" />
<form cond="!Mobile::isMobileCheckByAgent()" action="./" method="post" onsubmit="return procFilter(this, window.insert)" class="bd_wrt bd_wrt_main clear">
<input type="hidden" name="mid" value="{$mid}" />
<!--@if(!$oDocument->getContentText() && $mi->content_default)-->
<input type="hidden" name="content" value="{htmlspecialchars($mi->content_default)}" />
<!--@else-->
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
<!--@end-->
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="comment_status" value="ALLOW" />
<input type="hidden" name="allow_trackback" value="N" />
<input type="hidden" name="status" value="SECRET" />
<!--// 상단 : 카테고리, 제목 -->
<table class="bd_wrt_hd bd_tb">
<tr>
<td>
<select cond="$mi->use_category=='Y' && $category_list" name="category_srl" class="category">
<option value="">{$lang->category}</option>
<option loop="$category_list => $val" disabled="disabled"|cond="!$val->grant" value="{$val->category_srl}" selected="selected"|cond="$val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl')">
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
</option>
</select>
</td>
<td width="100%" style="padding-right:12px">
<span class="itx_wrp">
<!--// 제목 고정 option에 들어가능 글자 3부분(예:전문가상담 신청)은 동일해야 합니다.-->
<select name="title" class="category">
<option value="">선택</option>
<option value="전문가상담 신청" selected="selected"|cond="$oDocument->getTitleText()=='전문가상담 신청'">전문가상담 신청</option>
<option value="현장실측 신청" selected="selected"|cond="$oDocument->getTitleText()=='현장실측 신청'">현장실측 신청</option>
</select> ※ 상담 유형을 선택하세요.
</span>
</td>
<td cond="$is_logged && !$oDocument->isExists() || $oDocument->get('status')=='TEMP'" class="m_no"><button type="button" class="bd_btn" onclick="doDocumentLoad(this);">{$lang->cmd_load}</button></td>
</tr>
아래와 같이 php 코드를 적용 했는대여 안되내여^^;;
<?
echo "2222";
?>
하면 잘 출력이 되는대여^^;;
<? include $_SERVER[DOCUMENT_ROOT]."/files/config/db.config.php" ?>
<?php
$link = mysql_connect($db_info->localhost, $db_info->hso5321, $db_info->ghkdtjrdls2);
$dbname = "hso5321_godohosting_com";
$tablename = "xe_member";
mysql_select_db($dbname, $link);
$query = "select * from xe_member where user_id != 'webmaster'";
mysql_query("set names utf8;");
$result = mysql_query($query, $link);
$num_results = mysql_num_rows($result);
?>
<p>(총 회원수 : <?php echo $num_results ?>명)</p>