Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Estou criando um site por DW 8 e DW CS5, Ja criei outros que deram certo, mas este que estou criando agora, estou usando um plugin pro DW 8 Chamado MX Collection.
Tudo bem, ele tem algumas funções que não são adicionais, mas ele serve como um winzard pra funções úteis como criar um a página para fazer upload de arquivos pro servidor, entre outras...
Tudo bem, fiz o site inteiro pelo MySQL e Servidor local.
Funciona PERFEITAMENTE sem quaisquer erros ou algum outro parecido.
Mas oque acontece? fiz o upload pro servidor e todos os arquivos que eu usei com o MX Collection dão esse erro:
Parse error: syntax error, unexpected $end in /home/meusite/public_html/includes/mxi/MXI_functions.inc.php on line 55
onde o arquivo original criado pelo proprio plugin eu abri e apagei a linha e foi gerando o mesmo erro em outras, e assim foi infinitivamente ate acaba o código -.
Fui nesses dois links:
http://www.koders.com/php/fid4E1115B2B4E21B1911F72A0D521619EA1D927B96.aspx?s=upload
onde se encontra o SCRIPT desta página, usei o do google q me parece mais seguro néeh -.
Mas deu a mesma coiza!!!!!!! Não sei oque faço! Vou colocar o código que ta no link do Code.google q ta ai encima aki embaixo:
<?php
/*
* ADOBE SYSTEMS INCORPORATED
* Copyright 2007 Adobe Systems Incorporated
* All Rights Reserved
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
* terms of the Adobe license agreement accompanying it. If you have received this file from a
* source other than Adobe, then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
*/
/*
Copyright (c) InterAKT Online 2000-2006. All rights reserved.
*/
/**
include a PHP page (containing HTML/HEAD/BODY and strips away the outer HTML
then eval the code
ob_start();
$GLOBALS['KT_MXI_parse_css'] = true;
$GLOBALS['KT_dir_depth'] = array(); 'relpath'=> '', 'dir'=>getcwd().DIRECTORY_SEPARATOR, 'dirrelpath'=>''
);
function mxi_getBaseURL() {
return KT_getUriFolder();
}
function mxi_includes_start($fName) {
if (!isset($GLOBALS['KT_REL_PATH'])) {
$GLOBALS['KT_REL_PATH'] = "";
}
$tmpArr = array();
$tmpArr['dirRelPath'] = dirname($fName)."/";
if ($tmpArr['dirRelPath'] == "./") {
$tmpArr['dirRelPath'] = "";
}
$tmpArr['relpath'] = KT_CanonizeRelPath($GLOBALS['KT_REL_PATH'].$tmpArr['dirRelPath']);
$tmpArr['relpath'] = ($GLOBALS['KT_REL_PATH'].$tmpArr['dirRelPath']);
$tmpArr['dir'] = getcwd().DIRECTORY_SEPARATOR;
$GLOBALS['KT_dir_depth'][] = $tmpArr;
$GLOBALS['KT_REL_PATH'] = $tmpArr['relpath'];
if ($tmpArr['dirRelPath'] != "") {
$chk = @chdir($tmpArr['dirRelPath']);
if ($chk === false) {
die(KT_getResource('PHP_CHDIR_FAILED', 'MXI', array($tmpArr['dirRelPath'])));
}
}
ob_start();
if (isset($GLOBALS['tNGs'])) {
if (!isset($GLOBALS['arrTNGs'])) {
$GLOBALS['arrTNGs'] = array();
}
$GLOBALS['arrTNGs'][] = $GLOBALS['tNGs'];
}
}
function mxi_includes_end() {
$content = ob_get_contents();
ob_end_clean();
$tmpArr = array_pop($GLOBALS['KT_dir_depth']);
$GLOBALS['KT_REL_PATH'] = $tmpArr['relpath'];
// dirty hack IIS
$chk = true;
if (substr($tmpArr['dir'],0,strlen($tmpArr['dir'])-1) !== realpath(dirname(__FILE__).'/../../')){
$chk = chdir($tmpArr['dir']);
} elseif (getcwd() !== realpath(dirname(__FILE__).'/../../')){
chdir (realpath(dirname(__FILE__)));
$chk = chdir ('../../');
}
if ($chk === false) {
die(KT_getResource('PHP_CHDIR_FAILED', 'MXI', array($tmpArr['dirRelPath'])));
}
$content = mxi_ParseHtml($content, $tmpArr['relpath']);
$GLOBALS['KT_REL_PATH'] = $GLOBALS['KT_dir_depth'][count($GLOBALS['KT_dir_depth'])-1]['relpath'];
echo $content;
if (isset($GLOBALS['arrTNGs']) && count($GLOBALS['arrTNGs']) > 0) {
$GLOBALS['tNGs'] = array_pop($GLOBALS['arrTNGs']);
}
}
function mxi_ParseHtml($text, $relPath) {
if (!isset($GLOBALS['mxi_scripts_hash'])) {
$GLOBALS['mxi_scripts_hash'] = array();
}
if (!isset($GLOBALS['mxi_links_hash'])) {
$GLOBALS['mxi_links_hash'] = array();
}
if (!isset($GLOBALS['mxi_styles_hash'])) {
$GLOBALS['mxi_styles_hash'] = array();
}
$ret = KT_transformsPaths($relPath, $text, false);
// get the <body>
$body = $ret;
$body = preg_replace("/^[\w\W]*<body[^>]*>/i", "", $body);
$body = preg_replace("/<\/body>[\w\W]*$/i", "", $body);
// get the <head>
$head = $ret;
$head = preg_replace("/^[\w\W]*<head[^>]*>/i", "", $head);
$head = preg_replace("/<\/head>[\w\W]*$/i", "", $head);
$links = "";
$styles = "";
if (isset($GLOBALS['KT_MXI_parse_css']) && $GLOBALS['KT_MXI_parse_css'] == true) {
// get the external CSS
preg_match_all("/<link[^>]*>[\n\r]*/i", $head, $links);
if (sizeof($links) == 1) {
$links = $links[0];
foreach ($links as $k => $link) {
$md5_link = md5($link);
if (in_array($md5_link, $GLOBALS['mxi_links_hash'])) {
unset($links[$k]);
} else {
array_push($GLOBALS['mxi_links_hash'], $md5_link);
}
}
$links = implode("", $links);
}
// get the inline CSS
preg_match_all("/<style[^>]*>[\w\W]*?<\/style>[\n\r]*/i", $head, $styles);
if (sizeof($styles) == 1) {
$styles = $styles[0];
foreach ($styles as $k => $style) {
$md5_style = md5($style);
if (in_array($md5_style, $GLOBALS['mxi_styles_hash'])) {
unset($styles[$k]);
} else {
array_push($GLOBALS['mxi_styles_hash'], $md5_style);
}
}
$styles = implode("", $styles);
}
}
// get the JavaScripts
preg_match_all("/<script[^>]*>[\w\W]*?<\/script>[\n\r]*/i", $head, $scripts);
if (sizeof($scripts) == 1) {
$scripts = $scripts[0];
foreach ($scripts as $k => $script) {
$md5_script = md5($script);
if (in_array($md5_script, $GLOBALS['mxi_scripts_hash'])) {
unset($scripts[$k]);
} else {
array_push($GLOBALS['mxi_scripts_hash'], $md5_script);
}
}
$scripts = implode("", $scripts);
} else {
$scripts = "";
}
$ret = $links.$styles.$scripts.$body;
return $ret;
}
?>Carregando comentários...