PHP - Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in

   
Vista:

Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in

Publicado por Luis luispush@gmail.com (3 intervenciones) el 20/06/2016 12:12:45
Hola a todos mi problema es que no puedo entrar al Panel de administrador me lanza este error:


Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1


Si alguien sabe que debo hacer por favor que me lo explique, muchas gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Xavi

Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in

Publicado por Xavi (28 intervenciones) el 20/06/2016 15:14:49
Hola Luis, según muestra el error es un problema de sintaxis... nos puedes mostrar el contenido del archivo display.php para ver si vemos el error?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in

Publicado por luis luispush@gmail.com (3 intervenciones) el 20/06/2016 15:23:35
Esto es lo que me sale en Display.php :


<?php$header_file = $smarty->fetch ('default/header.html');$side_file = $smarty->fetch ('default/side.html');$footer_file = $smarty->fetch ('default/footer.html');$body_file = $smarty->fetch ('default/'.$templatefile .'.html');$template_output = $header_file . $side_file . $body_file . $footer_file;echo $template_output;



Esto es lo que me sale log error:



[18-Jun-2016 00:13:59 UTC] PHP Fatal error: Call to undefined function get_transient() in /home/u539051669/public_html/wp-itapi.php on line 16
[18-Jun-2016 00:14:00 UTC] PHP Fatal error: Call to undefined function get_transient() in /home/u539051669/public_html/wp-itapi.php on line 16
[18-Jun-2016 00:14:02 UTC] PHP Fatal error: Call to undefined function get_transient() in /home/u539051669/public_html/wp-itapi.php on line 16
[18-Jun-2016 00:14:09 UTC] PHP Fatal error: Call to undefined function get_transient() in /home/u539051669/public_html/wp-itapi.php on line 16
[18-Jun-2016 00:14:11 UTC] PHP Fatal error: Call to undefined function get_transient() in /home/u539051669/public_html/wp-itapi.php on line 16
[18-Jun-2016 00:14:12 UTC] PHP Fatal error: Call to undefined function get_transient() in /home/u539051669/public_html/wp-itapi.php on line 16
[18-Jun-2016 00:43:10 UTC] PHP Warning: require(includes/config.php): failed to open stream: No such file or directory in /home/u539051669/public_html/index.php on line 3
[18-Jun-2016 00:43:10 UTC] PHP Fatal error: require(): Failed opening required 'includes/config.php' (include_path='.:/opt/php-5.5/pear') in /home/u539051669/public_html/index.php on line 3
[18-Jun-2016 00:45:09 UTC] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'luis'@'10.2.1.59' (using password: YES) in /home/u539051669/public_html/includes/MysqliDb.php on line 140
[18-Jun-2016 00:45:09 UTC] PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 143
[18-Jun-2016 00:45:09 UTC] PHP Warning: mysqli::prepare(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 822
[18-Jun-2016 00:45:09 UTC] PHP Warning: MysqliDb::_prepareQuery(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:45:09 UTC] PHP Fatal error: Problem preparing query (show tables) in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:45:09 UTC] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'luis'@'10.2.1.59' (using password: YES) in /home/u539051669/public_html/includes/MysqliDb.php on line 140
[18-Jun-2016 00:45:09 UTC] PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 143
[18-Jun-2016 00:45:09 UTC] PHP Warning: mysqli::prepare(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 822
[18-Jun-2016 00:45:09 UTC] PHP Warning: MysqliDb::_prepareQuery(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:45:09 UTC] PHP Fatal error: Problem preparing query (SELECT * FROM `config` where id=1 ) in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:45:55 UTC] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'luis'@'10.2.1.59' (using password: YES) in /home/u539051669/public_html/includes/MysqliDb.php on line 140
[18-Jun-2016 00:45:55 UTC] PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 143
[18-Jun-2016 00:45:55 UTC] PHP Warning: mysqli::prepare(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 822
[18-Jun-2016 00:45:55 UTC] PHP Warning: MysqliDb::_prepareQuery(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:45:55 UTC] PHP Fatal error: Problem preparing query (SELECT * FROM `config` where id=1 ) in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:49:08 UTC] PHP Warning: mysqli::mysqli(): (28000/1045): Access denied for user 'luis'@'10.2.1.59' (using password: YES) in /home/u539051669/public_html/includes/MysqliDb.php on line 140
[18-Jun-2016 00:49:08 UTC] PHP Warning: mysqli::set_charset(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 143
[18-Jun-2016 00:49:08 UTC] PHP Warning: mysqli::prepare(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 822
[18-Jun-2016 00:49:08 UTC] PHP Warning: MysqliDb::_prepareQuery(): Couldn't fetch mysqli in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:49:08 UTC] PHP Fatal error: Problem preparing query (SELECT * FROM `config` where id=1 ) in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:50:31 UTC] PHP Fatal error: Problem preparing query (SELECT * FROM `config` where id=1 ) Table 'u539051669_root.config' doesn't exist in /home/u539051669/public_html/includes/MysqliDb.php on line 823
[18-Jun-2016 00:54:00 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 00:54:01 UTC] PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/u539051669/public_html/api/smarty/libs/Smarty_Compiler.class.php on line 270
[18-Jun-2016 00:54:47 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 00:54:52 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 00:54:55 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 00:56:43 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:04:19 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:04:26 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:04:28 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:04:36 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:04:50 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:06:05 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:06:09 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:06:13 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:06:39 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:12:29 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:12:44 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:12:52 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:14:18 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:14:42 UTC] PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/u539051669/public_html/api/smarty/libs/Smarty_Compiler.class.php on line 270
[18-Jun-2016 01:16:36 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:17:04 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:17:59 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:19:04 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:19:06 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:19:10 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:19:24 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:20:12 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:20:23 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:20:31 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:20:47 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:21:55 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:22:09 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:22:22 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:22:41 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:22:42 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:26:06 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:26:06 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:26:47 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:26:52 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:31:18 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:31:20 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
[18-Jun-2016 01:32:47 UTC] PHP Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in /home/u539051669/public_html/admin/display.php on line 1
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve

Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in

Publicado por xve (5516 intervenciones) el 20/06/2016 17:56:54
Lo unico que veo lues, es que esta todo en una sola linea, y la primera variable esta pegada al tag de php... también veo que no cierra el tag del php...

Puedes probar así?
1
2
3
4
5
6
7
<?php
$header_file = $smarty->fetch ('default/header.html');
$side_file = $smarty->fetch ('default/side.html');
$footer_file = $smarty->fetch ('default/footer.html');
$body_file = $smarty->fetch ('default/'.$templatefile .'.html');
$template_output = $header_file . $side_file . $body_file . $footer_file;
echo $template_output;
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar

Parse error: syntax error, unexpected '$header_file' (T_VARIABLE) in

Publicado por luis luispush@gmail.com (3 intervenciones) el 20/06/2016 18:20:51
Muchas gracias por tu tiempo Ya funciona a la perfeccion, personas como usted no hay muchas gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar