I am using an include statement and for some reason when I do that, the engine does a newline before showing the included material.
Seems to be a bizarre problem.
<?php include '/footer.html' ?>
include issue
Moderator: General Moderators
include issue
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: include issue
Is there a new line inside the included file?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Re: include issue
nope, just HTML5
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: include issue
I noticed you used:
If you include a / then use ./
Example:
Code: Select all
<?php include "/footer.php"; ?>Example:
Code: Select all
<?php include"./footer.php" ?>- Kaleb Klein
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
Re: include issue
or simply don't use "./" or "/" at all...
Code: Select all
<?php include "footer.php"; ?>Re: include issue
I found that changing the included file fixed the problem
content was on 1 line, changed it to multiline and it worked, go figure
content was on 1 line, changed it to multiline and it worked, go figure
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP