blob: 96beb027d3e88b486d7baf724995d4e2b4ac5975 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="Adobe RoboHelp 8">
<title>PHP Include Paths</title>
<link rel="StyleSheet" href="default.css" type="text/css">
<style type="text/css">
<!--
body { border-left-style:None;
border-right-style:None;
border-bottom-style:None;
background-color:Transparent;
border-top-style:None; }
-->
</style>
<style type="text/css">
<!--
body { border-left-style:None;
border-right-style:None;
border-bottom-style:None;
background-color:Transparent;
border-top-style:None; }
-->
</style>
<script type="text/javascript" language="JavaScript">
//<![CDATA[
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
//]]>
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute;
left:0px;
top:0px;
z-index:4;
visibility:hidden; }
p.WebHelpNavBar { text-align:right; }
-->
</style>
<script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
<script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
if (window.gbWhTopic)
{
var strUrl = document.location.href;
var bc = 0;
var n = strUrl.toLowerCase().indexOf("bc-");
if(n != -1)
{
document.location.href = strUrl.substring(0, n);
bc = strUrl.substring(n+3);
}
if (window.setRelStartPage)
{
addTocInfo("Concepts\nPHP Include Path");
addAvenueInfo("Concepts","breakpoints.htm","build_paths.htm");
}
document.write("<p style=\"text-align:left\"> ");
AddMasterBreadcrumbs("ide_help.htm", "", "&gt;", "Home", "pdt_table_of_contents.htm");
document.write("<a href=\"concepts.htm\">Concepts<\/a> &gt; PHP Include Path<\/p>");
if (window.setRelStartPage)
{
setRelStartPage("ide_help.htm");
autoSync(0);
sendSyncInfo();
sendAveInfoOut();
}
}
else
if (window.gbIE4)
document.location.reload();
//-->
//]]></script>
</head>
<body leftmargin="5" topmargin="5" rightmargin="5" bottommargin="5"><script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
if (window.writeIntopicBar)
writeIntopicBar(4);
//-->
//]]></script>
<div style="width: 100%; position: relative;" id="header">
<p align="right"><a
title="Documentation Survey" href="http://spreadsheets.google.com/viewform?formkey=dC1scEswTjFia2tDQ3Y5TVJBbkNQcWc6MQ">Documentation
Survey</a>
| <a href="javascript:crlf=&quot;&quot;;h=location.href;t=document.title;e = &quot;&quot; + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (e!=null) location=&quot;mailto:documentation@zend.com&quot; + &quot;?Subject= Feedback on PDT for page &quot; + escape(t) + &quot;&amp;Body=&quot; + escape(e).replace(/ /g, &quot;+&quot;) + crlf + &quot; &quot;; void 0"><span
style="background-color: #ffffff;">Submit Documentation</span><span
style="background-color: #ffffff;"> Feedback</span></a><span
style="background-color: #ffffff;"></span><span style="background-color: #ffffff;">
</span><span style="background-color: #ffffff;">|
</span><span
style="background-color: #ffffff;"><a title="View Latest Version and Get PDF Online"
href="http://www.zend.com/en/resources/zend-documentation/"
target="_blank">View Latest
Version and Get PDF Online</a></span></p>
</div>
<h1>PHP Include Paths
</h1>
<p>The PHP Include Path is a set of locations that is used for finding
resources referenced by include/require statements.</p>
<p class="Note">Note:</p>
<p class="NoteText">Adding libraries or
external projects elements to your project's Include Path will also make
elements defined in these resources available as content assist options.</p>
<p>Elements added to a project's Include Path affect the following:</p>
<ul type="square">
<li><p><a href="running.htm">Running</a>/<a href="debugging.htm">Debugging</a>
- Files that are called with a '<a href="relative_path">relative path</a>'
will be searched for during runtime in the resources and order specified
in the include path.</p></li>
<li><p><a href="using_smart_goto_source.htm">Go to source</a> - Files that
are called with a '<a href="relative_path">relative path</a>' will
be searched for according to the resources and order specified in
the project's include path.</p></li>
</ul>
<p>&#160;</p>
<p>In 'include'/'require' calls, file locations can be defined in three
ways:</p>
<ol type="i">
<li class="p" style="margin-left: -20px;" type="a"><p><span style="font-weight: bold;"><b>Absolute</b></span>
<span style="font-weight: bold;"><b>Path</b></span>- The exact file location
is specified (e.g. C:\Documents and Settings\MyProject\myfolder\a.php).
During PHP Web Page Running/Debugging the <a href="path_mapping.htm">Path
Mapping</a> mechanism will be activated.</p></li>
<li class="p" style="margin-left: -20px;" type="a"><p><span style="font-weight: bold;"><b>Relative
to the Current Working Directory</b></span> - File names preceded with
a &quot;./&quot; or a &quot;../&quot; These will only be searched
for relative to the PHP 'Current Working Directory'. You can find
out the location of your Current Working Directory by running the
command &quot;echo getcwd()&quot;.</p></li>
<li class="p" style="margin-left: -20px;" type="a"><p><span style="font-weight: bold;"><b><a
name="relative_path" id="relative_path"></a>Relative</b></span> <span
style="font-weight: bold;"><b>Path</b></span> - Only the file name or partial
path is specified (e.g. /myfolder/a.php). In this case, PDT will search for
the file's path according to the resources and order configured in
the project's Include Path.<br>
If the path of the file being searched for exists in more than one
location, the file that is called will be the first one PDT encounters during
the search process.
</p>
<ol type="i">
</ol></li>
</ol>
<p>See <a href="http://il2.php.net/manual/en/function.include.php" target="_blank">http://il2.php.net/manual/en/function.include.php</a>
for more on PHP's search mechanism.</p>
<table cellspacing="0" width="100%">
<col style="width: 7.093%;">
<col style="width: 92.907%;">
<tr style="vertical-align: top;
height: 16px;">
<td style="width: 7.093%; padding-right: 10px;
padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%;
padding-right: 10px; padding-left: 10px;"><p>&#160;</p></td>
</tr>
<tr style="vertical-align: top;
height: 35px;">
<td style="width: 7.093%; padding-right: 10px;
padding-left: 10px;"><p
style="font-size: 6pt;"><img src="link_icon.png" alt="link_icon.png" style="border: none;" width="32" height="40" border="0">
</p></td>
<td style="width: 92.907%;
padding-right: 10px; padding-left: 10px;"><p><span
style="font-weight: bold;"><b>Related Links:</b></span><a href="adding_elements_to_a_project_s_include_path.htm"><br>
Configuring a Project's PHP Include Path</a></p>
</td>
</tr>
<tr style="vertical-align: top;
height: 19px;">
<td style="width: 7.093%; padding-right: 10px;
padding-left: 10px;"><p
style="font-size: 6pt;">&#160;</p></td>
<td style="width: 92.907%;
padding-right: 10px; padding-left: 10px;"><p>&#160;</p></td>
</tr>
</table>
<div style="width: 100%; position: relative;" id="footer">
<p style="text-decoration: underline; "
align="center">PHP Development
Tools</p>
</div>
<script type="text/javascript" language="javascript1.2">//<![CDATA[
<!--
if (window.writeIntopicBar)
writeIntopicBar(0);
highlightSearch();
//-->
//]]></script>
</body>
</html>