ציטוט:
נכתב במקור על ידי MasterT
אפשר לדעת למה?
ו-Tomer, מה הבעייה ביעילות?
יכול להיות שלא הבנתם.
אני מכין עיצוב, מקודד אותו והכל,
ניקח לדוגמה את העיצוב עם פרטים לדוגמה ששמתי:
HTML קוד:
<html>
<head>
All The Properties
<title>HiH-Hosts is good</title>
<head>
<body>
<div class="Logo"> Hosts is Good</div>
<div class="Menu"> Index | Forums</div>
<div class="text"> Welcome </text>
</body>
</html>
אני הופך את זה ל-
HTML קוד:
<html>
<head>
All The Properties
<title><!--title--></title>
<head>
<body>
<div class="Logo"><!--logo--></div>
<div class="Menu"><!--menu--></div>
<div class="text"> <!--text--> </text>
</body>
</html>
ולפני שאני אציג,
$this->tmp = str_replace("<!--logo-->", $row['logo'], $this->tmp);
וככה גם לשאר(כמובן שאפשר גם ב-array).
אשמח לדעת מה הבעייה?
|
שזה לא יעיל להריץ כלכך הרבה str_replace