Jump to content

header ()


westman

Recommended Posts

The line breaks and spaces will be sent to the client if the empty lines are outside of the <?php ?> block. You don't need to worry about it unless you're going to send cookies, start sessions or send headers after that line.

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

All that matters is if you have anything before "<?php". Once you're inside "<?php", you're no longer sending output until you have an "echo", "print" or stuff like that. Any header(), cookie, session stuff must happen before any such stuff.Having stuff before "<?php" (including empty lines) is exactly what we were talking about.

Link to comment
Share on other sites

omg its working so well i even got my "session_start();" working and setting variables for logged in or out users ones again thank you i have so much to learn about php speaking of learning could some1 recommend a site to learn php from day 1, i have looked at this site (w3schools) but the English used is not for beginners (meaning jumping straight in to technical terms like line breaks lol) so its hard to keep up

Link to comment
Share on other sites

If you think "line break" is a technical term, then you probably need to find something in whatever your native language is, or better yet - find a ("physical", not online) course you can go to.I mean, what other term would you suggest for "a thing that separates one line in a text from another line of that same text"? "line separator" is the only alternative one I can think of, but that sounds even more technical to me. Speaking of which, if you like "line separator", brace yourself for technical terms like "directory separator" and "path separator", which you'll end up with sooner or later :P .I mean, you're right in that there are some technical terms in there (like "string"; it took me a while to realize that's a technical term for "text"), but if you just try guessing, chances are you'll be in the ballpark. And if you fail even at that... that's what we're here for.

Link to comment
Share on other sites

Come to think of it, this might actually be a hinderance too, though in a different way than how a non-native speaker might have problems with.I mean, although my English was decent when I started learning, I still brushed off the technical terms as "English words I don't know due to my average English skills" rather than "technical terms", so that made it easier to sweep over the tutorials, and fix misconceptions as I practice (which is exactly what I'm proposing you do anyway), rather than trying to nail it all together from the start.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...