2013-04-06, 00:36:34
In my functions.php, I have this code :
In my template.php file, I have this code :
Nothing is displayed and I have two errors :
The line 51 : $data = getXML(GSUSERSPATH.$author.'.xml');
The line 52 : $NAME = stripslashes($data->NAME);
PHP Code:
if (file_exists(GSUSERSPATH.$data_index->author.'.xml')) {
$data = getXML(GSUSERSPATH.$author.'.xml');
$NAME = stripslashes($data->NAME);
}
In my template.php file, I have this code :
PHP Code:
<p>Auteur : <?php echo $NAME; ?></p>
Nothing is displayed and I have two errors :
PHP Code:
Notice: Undefined variable: author in /Users/mymac/Sites/gs-site/theme/mytheme/functions.php on line 51
Notice: Trying to get property of non-object in /Users/mymac/Sites/gs-site/theme/mytheme/functions.php on line 52
The line 51 : $data = getXML(GSUSERSPATH.$author.'.xml');
The line 52 : $NAME = stripslashes($data->NAME);
Français et éternel débutant
French and eternal beginner
French and eternal beginner