Hi all,
Say i have a php script like this:
?php
print(html_head());
// do loads of time taking stuff
print(html_footer());
?
How come I dont see the html header (it's just a function that returns a
string with the html up till body) before the entire script has run?
This goes against my
Nick Wilson wrote:
Say i have a php script like this:
?php
print(html_head());
// do loads of time taking stuff
print(html_footer());
?
How come I dont see the html header (it's just a function that returns a
string with the html up till body) before the entire script has run?
This goes
There is nothing wrong with what your doing, i use this sort of thing
for all the big sites i make, i use a page class and use methods to
create the header and footer, so your concept is good. I would
investigate your html_head() function, to make sure its actually
returning something. Sinse
Well, there is a difference between
function html_head() {
$html = html;
return $html;
}
and
function header() {
?
html
head
title
?
}
The first function you need to call using ? echo header(); ? to see the output
THe second function
dirk wrote:
The first function you need to call using ? echo header(); ? to see the output
THe second function is not a real function because it has no return
statement. In german you call this Prozedur. Don't know if it's the
same as procedure in english. But you will call this piece ?
header();
* and then Jason Davidson declared
i prefer to escape from php inside my header fucntion, and just not
print it..
eg.
function header() {
?
html
head
title
?
}
Yes, i remember now, thanks ;-)
I've been using Smarty (smarty.php.net) for so long now that i've
forgotten
* and then John Holmes declared
How come I dont see the html header (it's just a function that returns a
string with the html up till body) before the entire script has run?
This goes against my understanding, why might this be and what might i
use to get some output before the script
yup, you took the words from my mouth...
[EMAIL PROTECTED] wrote:
dirk wrote:
The first function you need to call using ? echo header(); ? to see the
output
THe second function is not a real function because it has no return
statement. In german you call this Prozedur. Don't know if
8 matches
Mail list logo