يوجد خطاء برمجى فى اضافه كود php فى الموضوع
الكود لايظهر كما هو بل يستبدال
برجاء الاهتمام بهذا الموضوع على شان المنتديات التعليميه
مثال
pbboard.class.php
CODE
<?php
////////////
// PowerBB Engine
require_once(DIR . 'engine/Engine.class.php');
// General systems
require_once(DIR . 'includes/functions.class.php');
if (defined('IN_ADMIN'))
{
require_once(DIR . 'includes/templatecp.class.php');
}
else
{
require_once(DIR . 'includes/template.class.php');
}
require_once(DIR . 'includes/pbboardCodeparse.class.php');
if (defined('IN_ADMIN'))
{
require_once(DIR . 'includes/FeedParser.php');
}
////////////
class PowerBB extends Engine
{
////////////
// General systems
var $functions;
var $template;
var $Powerparse;
var $FeedParser;
////////////
function PowerBB()
{
////////////
$e = Engine::Engine();
////////////
if (!defined('INSTALL'))
{
$this->template = new PowerBBTemplate;
$this->Powerparse = new PowerBBCodeParse;
if (defined('IN_ADMIN'))
{
$this->FeedParser = new FeedParser;
}
}
////////////
if (defined('IN_ADMIN'))
{
$this->functions = new PowerBBAdminFunctions();
}
else
{
$this->functions = new PowerBBFunctions();
}
////////////
if (!is_bool($e)
and $e == 'ERROR::THE_TABLES_ARE_NOT_INSTALLED'
and !defined('INSTALL'))
{
@header("**: setup/install");
exit;
}
}
////////////
}
////////////
?>
كود اخر من اكواد php
CODE
<?php
include("config.php");
include("bbcode/functions.bbcode.php");
$sql="SELECT * FROM `com` ORDER BY `id` DESC";
$result=mysql_query($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-**="Content-Type" content="text/html; charset=windows-1256" />
<title>تجريبى اضافة تعليق</title>
<link rel='stylesheet' type="text/css" href='css/template.css' />
</head>
<body>
<div id='headblock'>التعليقات</div>
<div id='bodyblock'>
<?php
while($rows=mysql_fetch_array($result)){
$name = $rows['name'];
$email = $rows['email'];
$text = ToHtml(stripslashes(nl2br($rows['text'])));
?>
<table width='100%' dir='rtl'>
<tr>
<td width='20%' id='td1'>كاتب التعليق</td>
<Td id='td2' style='color:red;' ><?php echo "$name";?></td>
</tr>
<tr>
<td width='20%' id='td1'>الايمل</td>
<Td id='td2' style='color:green;'><?php echo "$email";?></td>
</tr>
<tr>
<td width='20%' id='td1'>التعليق</td>
<Td id='td2' ><?php echo "$text";?></td>
</tr>
<tr><td colspan='2'><br /></td></tr>
</table>
<?php
}
?>
<tr>
<td><strong><a href="index.php"><span lang="ar-sa">اضافه تعليق</span></a> </strong></td>
</tr> </div>
وهذا مثال اخر مع صوره
المثال
CODE
<?php
$result = $db->query("select * from tbl_name");
// fetch_array First
$row = $result->fetch_array(MYSQLI_NUM);
echo $row['0'];
echo $row['1'];
// fetch_array secnd
$row = $result->fetch_array(MYSQLI_ASSOC);
echo $row['username'];
echo $row['password'];
// fetch_array Third
$row = $result->fetch_array(MYSQLI_BOTH);
echo $row['0'];
echo $row['username'];
?><span style="\"color:" #0000bb\"="">
يارت تخالى الاكواد تظهر هكذا بيكون احسن
الالوان وغيرها
وشكرا
انا لا املك منتدى بس هذا الموضع هيفد ناس كتير وهيحسن من مستوى المنتدى
وزياده اقبل النسخه وشكرا
وفى شىء كمان انا شوفت حالا
عند نقال كود من موقع اخر المثال على نفس الكود المصور
بيجلب التنسيق فى اضافه الكود
CODE
<?php
$result = $db->query("select * from tbl_name");
// fetch_array First
$row = $result->fetch_array(MYSQLI_NUM);
echo $row['0'];
echo $row['1'];
// fetch_array secnd
$row = $result->fetch_array(MYSQLI_ASSOC);
echo $row['username'];
echo $row['password'];
// fetch_array Third
$row = $result->fetch_array(MYSQLI_BOTH);
echo $row['0'];
echo $row['username'];
?>