📄 c2519.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD><TITLE>PHP Extension</TITLE><link href="../style.css" rel="stylesheet" type="text/css"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINKREL="HOME"TITLE="Fast Artificial Neural Network Library"HREF="index.html"><LINKREL="PREVIOUS"TITLE="fann_set_activation_output_steepness"HREF="r2496.html"><LINKREL="NEXT"TITLE="API Reference"HREF="x2553.html"></HEAD><BODYCLASS="chapter"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Fast Artificial Neural Network Library</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="r2496.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x2553.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="chapter"><H1><ANAME="php"></A>Chapter 6. PHP Extension</H1><P>These functions allow you to interact with the FANN library from PHP.</P><P>This extension requires the <AHREF="http://fann.sf.net/"TARGET="_top">FANN</A> library, version 1.1.0 or later.</P><P> This extension supports the same activation functions as the library, a list of which can be found in the <AHREF="r2030.html"><I>Activation Functions</I></A> section. </P><DIVCLASS="section"><H1CLASS="section"><ANAME="php.install">6.1. Installation</A></H1><DIVCLASS="section"><H2CLASS="section"><ANAME="php.install.pear">6.1.1. Using PEAR</A></H2><P> The easiest way to install FANN-PHP is to use PEAR- if you have a fairly recent version of PHP installed, simply run <BCLASS="command">pear install fann</B>. Note that if there are no stable releases of FANN-PHP, you may have to specify the URI for the package, which can be obtained from <AHREF="http://pecl.php.net/fann"TARGET="_top">http://pecl.php.net/fann</A>. </P><P> If you cannot install FANN-PHP using PEAR, you can try following the (obsolete) instructions at <AHREF="http://www.cs.utexas.edu/users/UTCS/online-docs/php/pear/faq.install-pecl.html"TARGET="_top">http://www.cs.utexas.edu/users/UTCS/online-docs/php/pear/faq.install-pecl.html</A>. </P><P> If you use one of these methods, you'll need to either dl('fann.so') or add it to your php.ini </P><P> If you use either of the above methods, you will probably need to be root. </P></DIV><DIVCLASS="section"><H2CLASS="section"><ANAME="php.install.ext">6.1.2. Compiling into PHP</A></H2><P> Please only use this method if using the methods outlined in <AHREF="c2519.html#php.install.pear"><I>Using PEAR</I></A> have failed. </P><P> If you wish to compile FANN-PHP into PHP itself, you can. First, uncompress the package into the ext subdirectory of your copy of the PHP source code, and rename the directory to ext/fann (from fann-x.x.x). </P><P> Next, you must rebuild the configure script- to do so, run <BCLASS="command">./buildconf</B> from the PHP source directory. </P><P> From here on, the procedure is similar to when you built PHP originally- run <BCLASS="command">./configure</B> with your desired options, plus <CODECLASS="parameter">--with-fann</CODE>. </P><P> Finally, run <BCLASS="command">make</B> and <BCLASS="command">make install</B>. Note that you will probably need to be root for <BCLASS="command">make install</B> to work. </P><P> This method may require flex and bison to work- more information can be obtained at <AHREF="http://www.php.net/anoncvs.php"TARGET="_top">http://www.php.net/anoncvs.php</A> </P></DIV></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="r2496.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="index.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x2553.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">fann_set_activation_output_steepness</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"> </TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">API Reference</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -