Can anyone start?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
ReDucTor
Forum Commoner
Posts: 90
Joined: Thu Aug 15, 2002 6:13 am

Can anyone start?

Post by ReDucTor »

Can anyone start?

If so can we do this:


Maximum of 5 lines changing
The Aim is to get a full checking, with some sorta markup in there code..hehe

Code: Select all

<?php
if(empty($page))
   $page="index";
include("templates/".$page.".html");
?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Code: Select all

<?php 
if(empty($page)) 
   $page="index"; 
include("templates/".$page.".html");
if (!function_exists('template_entry'))
    die($page.': invalid template');
?>
ReDucTor
Forum Commoner
Posts: 90
Joined: Thu Aug 15, 2002 6:13 am

Post by ReDucTor »

Code: Select all

<?php 
if(empty($page)) 
   $page="index"; 
include("templates/".$page.".html"); 
if (!function_exists('template_entry')) 
    die($page.': invalid template'); 
function call_func($name,$args_str) 
&#123; // Now we can do call_func('template_entry','')
if(function_exists($name))
eval($name."(".$args_str.");");
&#125;
?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Code: Select all

&lt;?php 
if(empty($page)) 
   $page="index"; 
include("templates/".$page.".html"); 
if (!function_exists('template_entry')) 
    die($page.': invalid template'); 
function call_func($name,$args_str) 
{ // Now we can do call_func('template_entry','') 
	if(function_exists($name)) 
	{
		eval($name."(".$args_str.");"); 
		return TRUE;
	}
	else
		return FALSE; // some might to know
}
?&gt;
ReDucTor
Forum Commoner
Posts: 90
Joined: Thu Aug 15, 2002 6:13 am

Post by ReDucTor »

Code: Select all

&lt;?php  
if(empty($page))  
   $page="index";  
if(!file_exists("templates/".$page.".html"))
   $page="missing";
include("templates/".$page.".html");  
if (!function_exists('template_entry'))  
    die($page.': invalid template');  
function call_func($name,$args_str)  
{ // Now we can do call_func('template_entry','') 
   if(function_exists($name))  
   { 
      eval($name."(".$args_str.");");  
      return TRUE; 
   } 
   else 
      return FALSE; // some might to know 
} 
?&gt;
Post Reply