Code Comments
Programming Forum and web based access to our favorite programming groups.Which is the corresponding in php of asp command: <!-- #Include file="file.asp" --> ?
Post Follow-up to this messageShearer wrote: > Which is the corresponding in php of asp command: > <!-- #Include file="file.asp" --> > ? <?php include "file.txt" ?> -- Els http://locusmeus.com/ Now playing: Yes - The Remembering (High the Memory)
Post Follow-up to this message<?php include "file.txt"; ?> Do not forget the semicolon. -Lost
Post Follow-up to this messageDen 16.07.2006 16:09, skriblet -Lost følgende: > <?php include "file.txt"; ?> > > Do not forget the semicolon. I just use <?php include 'file.inc' ?> - is this wrong? -- mvh Ørjan Langbakk http://www.bergenpchjelp.no http://www.cubic-design.net
Post Follow-up to this messageØrjan Langbakk wrote: > Den 16.07.2006 16:09, skriblet -Lost følgende: > > I just use <?php include 'file.inc' ?> - is this wrong? Not wrong, but bad practise. Grtz, -- Rik Wasmus
Post Follow-up to this messageDen 16.07.2006 16:27, skriblet Rik følgende: > Ørjan Langbakk wrote: > > > Not wrong, but bad practise. Why is it bad practise? I'm relatively new to PHP, and yes, I am a bitas to when I should use " and ', but in this particular case, why is the include using '' bad? -- mvh Ørjan Langbakk http://www.bergenpchjelp.no http://www.cubic-design.net
Post Follow-up to this message"Rik" <luiheidsgoeroe@hotmail.com> wrote in message news:37234$44ba4c81$8259c69c$13966@news1 .tudelft.nl... > Not wrong, but bad practise. > > Grtz, > -- > Rik Wasmus What Rik said. If you tend to code *neatly* as it were, you can be assured that it is not t he culprit when a problem does arise. -Lost
Post Follow-up to this messageØrjan Langbakk wrote: > Den 16.07.2006 16:27, skriblet Rik følgende: > > Why is it bad practise? I'm relatively new to PHP, and yes, I am a bit >as to when I should use " and ', but in this particular case, > why is the include using '' bad? Euhm, I was referring to the semicolon. both are Bad Practise without semi-colon: <?php include "file.txt" ?> <?php include 'file.txt' ?> Unnecessary extra evaluation in PHP: <?php include "file.txt"; ?> Good Practise: <?php include 'file.txt'; ?> Unless offcourse you want to use variable name to name your include file, else '' is better then "". Grtz, -- Rik Wasmus
Post Follow-up to this message
"Shearer" <shearer@libero.it> wrote in message
news:Od7ug.41579$_J1.500251@twister2.libero.it...
> Which is the corresponding in php of asp command:
> <!-- #Include file="file.asp" -->
> ?
>
I use
<?php require_once("file.xxx" ); ?>
Shelly
Post Follow-up to this messageDen 16.07.2006 16:52, skriblet Rik følgende: > Ørjan Langbakk wrote: > > > Euhm, I was referring to the semicolon. > > both are Bad Practise without semi-colon: > <?php include "file.txt" ?> > <?php include 'file.txt' ?> > > Unnecessary extra evaluation in PHP: > <?php include "file.txt"; ?> > > Good Practise: > <?php include 'file.txt'; ?> > > Unless offcourse you want to use variable name to name your include file, > else '' is better then "". > > Grtz, Ah. Then I'm following you - I thought you meant the whole ''-thing, not only the semicolon - I'll start using that then :) -- mvh Ørjan Langbakk http://www.bergenpchjelp.no http://www.cubic-design.net
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.