I am construction a website utilizing minimal PHP. My initial focus was utilizing includes. I have extrinsic the following inside assorted elements such as to streamline website far-reaching changes.
< girl br />CodeAs you can see, I additionally used the Global non-static Not certain if that is precisely scold vernacular when “including” my “nav.php” file. At initial I was customarily pretty girls utilizing relations links. But afterwards I motionless it would be a lot simpler if I could customarily do all in propinquity to root. Then I detected the HTML, CSS, and PHP think of opposite directories as root.
I hold that PHP considers “/” the tangible base office on the server, whilst HTML and CSS have make make make make make make make make make make make make use of of of of of of of of of of of of of the domains base office or the office that the record being executed is in?
Anyway, utilizing the $_SERVER["DOCUMENT_ROOT"]. content works, nonetheless I wasn”t certain since it wasn”t similar to this
Note that I forsaken the “.” and pu girls t the $_SERVE sexy girls R["DOCUMENT_ROOT"] inside the quotes with the /static/nav.php.
This seems most some-more discerning to me, cruise that I figured it would customarily surrogate the content “/var/www” but beach girls delay for beautiful girl the $_SERVER["DOCUMENT_ROOT"].
What is the “.” for and since does it have to be outward the quotes??
Also, I wasn”t equates to to get this process to work when the embody was inside carrots. For instance. I have an embody couple to “links.php”
The “links.php” record looks similar to such
Code
Comments are closed.