Parse error: syntax error, unexpected T_STRING in /web/htdocs/* on line 1
Senza parole, in locale funziona, in remoto no, mi da errore nella prima riga dello script, dove apro con <?php
Link esemplificativo: http://www.makingart.org/banners.php
Per sicurezza, non voglio che l'errore sparisca, ecco uno screen:
Naturalmente avrò refreshato non so quante volte, ma continua a dare l'errore, ricaricato il file un paio di volte e da sempre errore...
Ecco il sorgente:
Codice PHP:
<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
$userdata = session_pagestart($user_ip);
init_userprefs($userdata);
define('U_BANNERS', 'banners.' . PHP_EXT);
include(IP_ROOT_PATH . 'language/lang_' . $board_config['default_lang'] . '/lang_banners.' . PHP_EXT);
$template->set_filenames(array('body' => 'banners_body.tpl'));
$folder = 'banners/';
$dir_open = './' . $folder;
if ($dir_handle = opendir($dir_open))
{
while (false !== ($size = readdir($dir_handle)))
{
if(($size != ".") && ($size != "..") && ($size != "..."))
{
$list_size[] = $size;
}
}
}
closedir();
$tot_list_size = count($list_size);
for($i = 0; $i <= $tot_list_size; $i++)
{
$list_element = $list_size[$i];
$template->assign_block_vars('select', array(
'SIZE' => $list_element,
'L_SIZE' => ucfirst($list_element),
));
}
if(empty($_GET['view']))
{
$page_banner_title = $lang['Banners'];
}
else
{
if((in_array($_GET['view'], $list_size)) && (($_GET['view'] != ".") && ($_GET['view'] != "..")))
{
$dir = $_GET['view'] . '/';
$view = $_GET['view'];
$page_banner_title = $lang['Banners'] . ' ' . $view;
$breadcrumbs_banner_address = $lang['Nav_Separator'] . '<a href="' . U_BANNERS . '">' . $lang['Banners'] . '</a>' . $lang['Nav_Separator'] . '<a href="#" class="nav-current">' . $view . '</a>';
$images = glob($folder . $dir . '*.*');
foreach($images as $file)
{
$image = '<img src="' . $file . '" alt="' . $view . '" />';
$size_image = round((filesize($file) / 1024), 2);
$last_edit_file_time = filemtime($file);
$bbcode_code = '[url=' . create_server_url() . '][img]' . create_server_url() . $file . '[/img][/url]';
$html_code = '<a href="http://' . create_server_url() . '" title="' . $board_config['sitename'] . '">' . $image . '</a>';
$direct_code = create_server_url() . $file;
$num_files[] = $file;
$template->assign_block_vars('image', array(
'SIZE_IMAGE' => $size_image . ' KB',
'LAST_EDIT_FILE_TIME' => create_date($board_config['default_dateformat'], $last_edit_file_time, $board_config['board_timezone']),
'L_UPLOAD' => $lang['Upload_At'],
'IMAGE' => $image,
'BBCODE_CODE' => $bbcode_code,
'HTML_CODE' => $html_code,
'DIRECT_CODE' => $direct_code,
));
}
$files = count($num_files);
if ($files == 0)
{
$tot_files = $lang['0_image'];
}
elseif ($files == 1)
{
$tot_files = $lang['1_image'];
}
else
{
$tot_files = $lang['Tot_Image_1'] . $files . $lang['Tot_Image_2'];
}
}
else
{
message_die(GENERAL_MESSAGE, 'Non hai selezionato nessuna scelta valida.<br />' . sprintf($lang['Return_Banners'], '<a href="' . U_BANNERS . '">', '</a>'));
}
}
$template->assign_vars(array(
'SIZE_VIEW' => $view,
'SELECT_SIZE' => $select_size,
'TOT_IMAGE' => $tot_files,
'L_SELECT_SIZE' => $lang['Select_Size'],
'L_SUBMIT_BANNER' => $lang['Submit_Banner'],
'L_UPLOAD' => $lang['Upload_At'],
'U_BANNERS' => U_BANNERS,
'S_VIEW_ADD_BANNER' => (empty($_GET['view'])) ? false : true,
));
// Start output of page
$page_title = $page_banner_title;
$meta_description = '';
$meta_keywords = '';
//define('SHOW_ONLINE', true);
$breadcrumbs_address = $breadcrumbs_banner_address;
include(IP_ROOT_PATH . 'includes/page_header.' . PHP_EXT);
$template->pparse('body');
include(IP_ROOT_PATH . 'includes/page_tail.' . PHP_EXT);
?>
Da cosa può dipendere?