问题描述:

My website was working fine, when all of a sudden a slash appeared right after the body tag. I tried to find out what was wrong but I had no luck.

How to fix this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>

<title>Toucan | <?=$title?></title>

<?php $this->load->view('include/head'); ?>

</head>

<body>

<div id="container">

<?php $this->load->view('include/header'); ?>

<?= $slideshow ?>

<table id="main">

<tr>

<?php if ($sidebar):?>

<td width="150px"><div id="sidebar"><?= $sidebar ?></div></td>

<?php endif; ?>

<td><div id="content"><?= $content ?></div></td>

</tr>

</table>

<?php $this->load->view('include/footer'); ?>

</div>

</body>

</html>

网友答案:

You should take a look at the end of your controller to check if you have a PHP closing tag : ?>. And maybe something like / after it...

This is good practice to omit the PHP closing tag at the end of your scripts.

网友答案:

I just google your webpage (toucan-eng.com) and a slash is showing in the main webpage. The title tag should be inside the head tag and then you need to put the body tag. Hope this can help you

相关阅读:
Top