{"id":706,"date":"2013-01-05T08:49:49","date_gmt":"2013-01-05T08:49:49","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=706"},"modified":"2022-02-17T07:14:03","modified_gmt":"2022-02-17T07:14:03","slug":"include-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/include\/include-general","title":{"rendered":".Include General"},"content":{"rendered":"<pre>\r\n<code>\r\ninclude (&#39;classes\/config.php&#39;);\r\ninclude_once (&#39;classes\/config.php&#39;);\r\nrequire (&#39;classes\/config.php&#39;);\r\nrequire_once (&#39;classes\/config.php&#39;);\r\n<\/code><\/pre>\n<h4>\nIncluded Files Corrupting Things<br \/>\n<\/h4>\n<h5>\nWhitespace&nbsp;before or after the php&nbsp;start and end markers<br \/>\n<\/h5>\n<p>\nWhite space&nbsp;or any characters before or after the &lt;?php and ?&gt; will be output in the same way as echo(as html) in an included file. This can be a problem, for instance having a line break after the ?&gt; and the file being included before say the start of say an echo&#39;d xml output&nbsp;will corrupt the xml output as a valid xml document requires the first line XML definition at the top of the file before any line break.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>include (&#39;classes\/config.php&#39;); include_once (&#39;classes\/config.php&#39;); require (&#39;classes\/config.php&#39;); require_once (&#39;classes\/config.php&#39;); Included Files Corrupting Things Whitespace&nbsp;before or after the php&nbsp;start and end markers White space&nbsp;or any characters before or after the &lt;?php and ?&gt; will be output in the same way as echo(as html) in an included file. This can be a problem, for instance having a line [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-706","post","type-post","status-publish","format-standard","hentry","category-include"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":6,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":1397,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/706\/revisions\/1397"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}