mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 13:57:03 +08:00
74 lines
2.3 KiB
HTML
74 lines
2.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>尝试加载未定义的类</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.autoload" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">__autoload</h1>
|
|
<p class="verinfo">(PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">__autoload</span> — <span class="dc-title">尝试加载未定义的类</span></p>
|
|
|
|
</div>
|
|
|
|
<div id="function.autoload-refsynopsisdiv">
|
|
<div class="warning"><strong class="warning">Warning</strong><p class="simpara">This feature has been
|
|
<em class="emphasis">DEPRECATED</em> as of PHP 7.2.0. Relying on this feature
|
|
is highly discouraged.</p></div>
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.autoload-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>__autoload</strong></span>
|
|
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$class</code></span>
|
|
) : <span class="type"><span class="type void">void</span></span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
你可以通过定义这个函数来启用<a href="language.oop5.autoload.html" class="link">类的自动加载</a>。
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.autoload-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">class</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
待加载的类名。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.autoload-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
没有返回值。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.autoload-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="spl_autoload_register.html" class="function" rel="rdfs-seeAlso">spl_autoload_register()</a> - 注册给定的函数作为 __autoload 的实现</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |