Jump to content
Fórum Script Brasil
  • 0

Parse error: parse error, unexpected $end


Adauto

Question

Bom dia a todos!

Parse error: parse error, unexpected $end

estou com este erro quando vou fazer o comando require_once

na hora de debugar dá o erro.

Já verifiquei "{", "<?", etc...

Não é dai o erro, pois estou usando uma biblioteca da produção, e lá funciona perfeitamente, mas quando tento implementar no meu micro em casa, não

dá certo

Será que pode ser alguma configuração do PHP ou similar?

Obrigado

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

caso você ainda olhe este código, desculpe a demora,

//Esta classe é que será instanciada

<?php
class clsCorpo {
  
var $strNome = 'Corpo1';
var $strImagensPath = '/pub/classes/clsCorpo/imagens/'; 
var $intConteudo = 0; // 0 = texto comum; 1 = arquivo
var $strLargura = '700px';
var $servidor = '';

function montar($_incConteudo){
    $this->servidor = $_SESSION["servidor"];
    $imagensPath = $this->servidor . $this->strImagensPath;
?>
<center>
<table border="0" cellpadding="0" cellspacing="0" width="<? print($this->strLargura); ?>">
    <tbody>
    <tr>
    <td align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody>
    <tr>
    <td>
    <img src="<? print($imagensPath); ?>s.gif" height="7" width="1"></td>
    </tr>
    <tr>
          <td>
    <img src="<? print($imagensPath); ?>main_top.gif" height="4" width="<? print($this->strLargura); ?>"></td>
    </tr>
    <tr>
    <td> <table border="0" cellpadding="0" cellspacing="0" width="<? print($this->strLargura); ?>">
<tbody>
    <tr>
    <td bgcolor="#d1d1d1" width="1"></td>
                 <td align="center" bgcolor="white" valign="top" width="99%">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
    <tr>
    <td width="15"> <img src="<? print($imagensPath); ?>s.gif" height="8" width="2">
    </td>
                  <td valign="top" width="100%">
    <?
                                                            if ($this->intConteudo == 0) {
        print($_incConteudo);
    }
    else {
                                                            include("$_incConteudo"); 
                                                            }
                                                                ?>
                                                             </td>
    <td width="15"> <img src="<? print($imagensPath); ?>s.gif" height="1" width="2"></td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="3"> <img src="<? print($imagensPath); ?>s.gif" height="0" width="15"></td>
                                                            </tr>
    </tbody>
    </table></td>
    <td bgcolor="#d1d1d1" width="1"></td>                                                <td bgcolor="#d1d1d1" width="1"></td>
        <td bgcolor="#bfbfbf" width="1"></td>
        <td bgcolor="#cdcdcd" width="1"></td>
                    <td bgcolor="#d7d7d7" width="1"></td>
        <td bgcolor="#dedede" width="1"></td>
    </tr>
    </tbody>
    </table></td>
    </tr>
    <tr>
    <td>
    <img src="<? print($imagensPath); ?>main_bottom.gif" height="8" width="<? print($this->strLargura); ?>"></td>
    </tr>
    </tbody>
    </table>
    </td>
    </tr>
    </tbody>
    </table>
    </center>        
<?
    }
    function destruir(){
        unset($this);
    }
}
?>
//E esta é a index
<?php
ini_set("display_errors", "1"); // aparecer os erros no servidor 
//error_reporting(E_ALL);
session_start();
require_once("../../pub/classes/clsCorpo/clsCorpo.php");
require_once("../../pub/classes/clsCorpo/clsCabecalho.php");
require_once("../../pub/classes/clsCorpo/clsRodape.php");
require_once("../../pub/classes/clsOracle/clsOracle.php");
require_once("../../pub/classes/clsUsuario/clsUsuario_.php");
require_once("../../pub/classes/clsForm/clsForm.php");
require_once("../../pub/classes/clsTabela/clsTabela_.php");
require_once("../../pub/classes/clsUsuario/clsLogin_.php");
require_once("../../pub/classes/clsCaixa/clsCaixa.php");
require_once("../../pub/classes/clsMenu/clsMenuHorizontal.php");
require_once("../../pub/classes/clsMenu/clsMenuVertical.php");
require_once("../../pub/php/arrayMesExtenso.php");


// classes das tabelas auxiliares
require_once("../cls/clsArea.php");
require_once("../cls/clsLegislacao.php");
require_once("../cls/clsTipo.php");
require_once("../cls/clsSubSecao.php");
require_once("../cls/clsMenuRequisito.php");
require_once("../cls/clsGrupoRequisito.php");


$ambiente = ""; // produção
if ( strrpos($_SERVER['PHP_SELF'], 'desenv') != 0) {
    $ambiente = "/desenv"; // desenvolvimento
}
$_SESSION['servidor'] = 'http://' . $_SERVER['SERVER_ADDR'] . $ambiente;
$_SESSION['pathSistema'] = $_SESSION['servidor'] . '/acreditacao/';
?>
<!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></title>
<link href="<? echo $_SESSION['servidor']; ?>/pub/css/biblio.css" type="text/css" rel="STYLESHEET">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#e2e2e2" bottommargin="0" topmargin="0"  rightmargin="0">
  <?
    $corpo = new clsCorpo();
    $corpo->strLargura = "980";
    $corpo->intConteudo = 1;
    $corpo->montar('principal.php');
    $corpo->destruir();    
  ?>
</body>
</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.5k
×
×
  • Create New...