Foros del Web » Programando para Internet » PHP »

AYUDA PHP ERROR! : Call to undefined function showAds()

Estas en el tema de AYUDA PHP ERROR! : Call to undefined function showAds() en el foro de PHP en Foros del Web. Hola, soy un novato del php y no me entero mucho... y me surgio un error en un codigo php: Fatal error: Call to undefined ...
  #1 (permalink)  
Antiguo 17/12/2010, 15:01
 
Fecha de Ingreso: diciembre-2010
Ubicación: España
Mensajes: 3
Antigüedad: 13 años, 4 meses
Puntos: 0
Exclamación AYUDA PHP ERROR! : Call to undefined function showAds()

Hola, soy un novato del php y no me entero mucho...
y me surgio un error en un codigo php:

Fatal error: Call to undefined function showAds() in C:\xampplite\htdocs\****\templates\all.header.tpl on line 125

-------------------------------------------------------------------

el codigo php es:

<?
require_once('templates/ads.config.tpl');
require_once('templates/box._structure.tpl');

$action = isset($_GET['action']) ? $_GET['action'] : '';



if(isset($_GET['cat'])){
$category_name = $gameset->categories[$_GET['cat']]->name.' '.$gameset->categories[$_GET['cat']]->mCategoryName;
$pagetitle = $category_name." Games, Play Online";
$headtitle = "Play ".$category_name." Games Online!";
$metades = "Free online ".$category_name." games. Play your favorite ".$category_name." flash games for free!";
$metakey = $category_name.", free games, play online ".$category_name." flash games";
} elseif (isset($_GET['search'])) {
$category_name = 'Search for `'.$_GET['search'].'`';
$pagetitle = $category_name." Games, Play Online";
$headtitle = $category_name." Games Online!";
$metades = "Free online ".$category_name." games. Play your favorite ".$category_name." flash games for free!";
$metakey = $category_name.", free games, play online ".$category_name." flash games";
} elseif (isset($_GET['id'])) {
$id = isset($_GET['id']) ? $_GET['id'] : '';
$game_name = ((empty($id)) ? '' : ($gameset->games[$id]->name));
$category_name = ((empty($id)) ? '' : ($gameset->games[$id]->category));
$pagetitle = $game_name.", ".$category_name." Game";
$headtitle = "Play ".$game_name.", Online ".$category_name." Game!";
$metades = "Play ".$game_name." online. ".$category_name." free flash game. Add ".$game_name." game code to Myspace.";
$metakey = $game_name." game, play online, ".$category_name." free games, ".$game_name." flash, myspace, blog code";
} else {
$pagetitle = $headtitle = SITE_TITLE;
$metades = MDES;
$metakey = MKEY;
}
?>
<!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>
<title><?= $pagetitle ?></title>
<meta name="keywords" content="<?= trim(strtolower($metakey)) ?>" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="<?= trim($metades) ?>" />
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="Top 100 Games (RSS 2.0)" href="<?php echo rssurl('top',SEO_SUPPORT,SEO_WORDS); ?>" />
<link rel="alternate" type="application/rss+xml" title="Last 100 Games (RSS 2.0)" href="<?php echo rssurl('last',SEO_SUPPORT,SEO_WORDS); ?>" />
<script src="templates/scripts.js" language="javascript" type="text/javascript"></script>
<?php
if (strlen(GOOGLE_ANALYTICS_ID)>0) {
?>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "<?=GOOGLE_ANALYTICS_ID?>";
urchinTracker();
</script>
<?php
}
?>
</head>

<body>

<div id="wrapper" align="center" style="width:<?= FULL_WIDTH == 1 ? "92%" : "1000px" ?>">

<div id="header">
<div class="heada">
<div class="headc">
<table cellspacing="0" border="0">
<tr>
<td><a href="<?php echo SITE_URL;?>" title="<?= $pagetitle ?>"><img class="logo" src="templates/images/logo.png" alt="Game Script" width="284" height="84" border="0" hspace="10" /></a></td>
<td valign="top">
<div class="topmenu">
<a href="<?php echo pagesurl('rss',SEO_SUPPORT,SEO_WORDS)?>" class="topmenu"><img align="absmiddle" src="templates/images/icons/rss.gif" alt="RSS Channels" />&nbsp;RSS</a> |
<a href="<?php echo pagesurl('memberlist',SEO_SUPPORT,SEO_WORDS)?>" class="topmenu">Memberlist</a> |
<a href="<?php echo pagesurl('about_us',SEO_SUPPORT,SEO_WORDS)?>" class="topmenu">About Us</a> |
<a href="<?php echo pagesurl('help',SEO_SUPPORT,SEO_WORDS)?>" class="topmenu">Help</a> |
<a href="mailto:<?= ADMIN_ADDRESS ?>" class="topmenu">Contact Us</a> |
<a class="topmenu" href="mailto:?subject=Play%20Free%20Games%20at%20< ?= SITE_URL ?>!">Tell a Friend</a> |
<a class="topmenu" href="#" onclick="bookmark('<?php echo SITE_URL.$_SERVER['REQUEST_URI'];?>', '<?php echo ImproveSymbols($pagetitle); ?>')">Bookmark Us</a>
</div>
</td>
</tr>
<tr class="navigator">
<td class="menu" colspan="2">
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td><?php include("templates/all.header.tabs.tpl"); ?></td>
<td>
<div class="quickgame">
<?php include("templates/all.header.quickplay.tpl"); ?>
</div>
</td>
</tr></table>

</td>
</tr>
</table>

</div>
</div>
</div>


<div id="submenu">
<div class="submenua">
<div class="submenuc">
<div>
<?php include("templates/all.header.categories.tpl"); ?>
</div>
</div>
</div>
</div>

<div id="submenushadow">
<div class="sushada">
<div class="sushadc">
</div>
</div>
</div>

<div class="wrappera">
<div class="wrapperc">

<div id="content">

<?php
showAds(0, true); <-------------------------------- LINIA 125
?>

<table class="content" cellspacing="5" border="0">
<tr>

--------------------------------------------------------------------------------------------------------

La linia 125 es:

showAds(0,true);

------------------------------------------------------------------------------------------------------

Espero que me ayuden, gracias!
  #2 (permalink)  
Antiguo 17/12/2010, 15:05
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Hola jackrar

Muevo tu tema al foro de PHP desde Web general.

Saludos,
  #3 (permalink)  
Antiguo 17/12/2010, 15:12
 
Fecha de Ingreso: diciembre-2010
Ubicación: España
Mensajes: 3
Antigüedad: 13 años, 4 meses
Puntos: 0
Respuesta: AYUDA PHP ERROR! : Call to undefined function showAds()

Puedes llamar a alguién que entienda de PHP? Es urgente corregir este error!!
  #4 (permalink)  
Antiguo 17/12/2010, 15:18
 
Fecha de Ingreso: mayo-2005
Mensajes: 201
Antigüedad: 18 años, 10 meses
Puntos: 2
Respuesta: AYUDA PHP ERROR! : Call to undefined function showAds()

Cita:
Call to undefined function showAds() in C:\xampplite\htdocs\****\templates\all.header.tpl on line 125
El compilador dice que en la linea 125 de all.header.tpl que es una plantilla hay una llamada a una funcion ShowAds que no ha sido definida...en otras palabras no la puede usar por que no sabe donde esta
__________________
Saludos!
Mty-NL..
  #5 (permalink)  
Antiguo 18/12/2010, 08:14
 
Fecha de Ingreso: febrero-2010
Mensajes: 56
Antigüedad: 14 años, 2 meses
Puntos: 1
Respuesta: AYUDA PHP ERROR! : Call to undefined function showAds()

reemplaza "showAds(0, true); " por "//showAds(0, true); " y dinos que es lo que sale..

Etiquetas: showads
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:13.