⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phar.running.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Returns the full path on disk or full phar URL to the currently executing Phar archive</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.offsetunset.html">Phar::offsetUnset</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.setalias.html">Phar::setAlias</a></div> <div class="up"><a href="class.Phar.html">Phar</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="phar.running" class="refentry"> <div class="refnamediv">  <h1 class="refname">Phar::running</h1>  <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">Phar::running</span> &mdash; <span class="dc-title">Returns the full path on disk or full phar URL to the currently executing Phar archive</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">bool</span> <span class="methodname"><b><b>Phar::running</b></b></span>    ([ <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$retphar</tt></span>  ] )</div>  <p class="para rdfs-comment">   Returns the full path to the running phar archive.  This is intended for use much   like the <i>__FILE__</i> magic constant, and only has effect inside   an executing phar archive.  </p>  <p class="para">   Inside the stub of an archive, <b>Phar::running()</b> returns   <i>&quot;&quot;</i>.  Simply use <b><tt>__FILE__</tt></b>   to access the current running phar inside a stub.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">retphar</tt></i></span>     <dd>      <p class="para">       <b><tt>TRUE</tt></b> by default.  If <b><tt>FALSE</tt></b>, the full path on disk to the phar       archive is returned.  If <b><tt>TRUE</tt></b> (default value), a full phar URL is returned.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> if the filename is valid.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 A <b>Phar::running()</b> example</b></p>    <div class="example-contents"><p>     For the following example, assume the file is within     phar archive <i>/path/to/phar/my.phar</i> and the     file is located at path <i>my/file.txt</i> within the     phar archive.    </p></div>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Phar</span><span style="color: #007700">::</span><span style="color: #0000BB">running</span><span style="color: #007700">();&nbsp;</span><span style="color: #FF8000">//&nbsp;$a&nbsp;is&nbsp;"phar:///path/to/my.phar"<br /></span><span style="color: #0000BB">$b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">Phar</span><span style="color: #007700">::</span><span style="color: #0000BB">running</span><span style="color: #007700">(</span><span style="color: #0000BB">false</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;$b&nbsp;is&nbsp;"/path/to/my.phar"<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.offsetunset.html">Phar::offsetUnset</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.setalias.html">Phar::setAlias</a></div> <div class="up"><a href="class.Phar.html">Phar</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -