![]() |
Really Basic Question about PHP includes
Note: No scripting is being run using includes by myself, nor anyone else. This is on including plain HTML files, not programs/scripts/etc.
What is the difference between all these ways of writing includes? On W3Schools, they use this code: Code:
<?php include("menu.php"); ?> Code:
include 'vars.php'; Code:
<?php include "menu.php"; ?> The second thing is this. Why do many books go back on what they say about security and Super Globals in later examples? |
These are all valid, but the prefered syntax is:
include("filename"); |
The <?php and ?> tags specify the start and end of where PHP should start processing code.
|
Quote:
Oh I and prefer using single quotes inside brackets...it looks far clean then double quotes. include('file.php'); :p |
Single quotes when not parsing variables, double when.
|
Quote:
|
All times are GMT. The time now is 02:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|