ifx.configuration.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 466 行 · 第 1/2 页
HTML
466 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Runtime Configuration</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="ifx.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="ifx.resources.html">Resource Types</a></div> <div class="up"><a href="ifx.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="ifx.configuration" class="section"> <h2 class="title">Runtime Configuration</h2> <p class="simpara">The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.</p> <blockquote><p><b class="note">Note</b>: Make sure that the Informix environment variables INFORMIXDIR and INFORMIXSERVER are available to the PHP ifx driver, and that the INFORMIX bin directory is in the PATH. Check this by running a script that contains a call to <a href="function.phpinfo.html" class="function">phpinfo()</a> before you start testing. The <a href="function.phpinfo.html" class="function">phpinfo()</a> output should list these environment variables. This is true for both CGI php and Apache mod_php. You may have to set these environment variables in your Apache startup script. <br /> The Informix shared libraries should also be available to the loader (check LD_LIBRARY_PATH or ld.so.conf/ldconfig). <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: <b> Some notes on the use of BLOBs (TEXT and BYTE columns) </b><br /> BLOBs are normally addressed by BLOB identifiers. Select queries return a "blob id" for every BYTE and TEXT column. You can get at the contents with "string_var = ifx_get_blob($blob_id);" if you choose to get the BLOBs in memory (with: "ifx_blobinfile(0);"). If you prefer to receive the content of BLOB columns in a file, use "ifx_blobinfile(1);", and "ifx_get_blob($blob_id);" will get you the filename. Use normal file I/O to get at the blob contents. <br /> For insert/update queries you must create these "blob id's" yourself with "<a href="function.ifx-create-blob.html" class="function">ifx_create_blob()</a>;". You then plug the blob id's into an array, and replace the blob columns with a question mark (?) in the query string. For updates/inserts, you are responsible for setting the blob contents with <a href="function.ifx-update-blob.html" class="function">ifx_update_blob()</a>. <br /> The behaviour of BLOB columns can be altered by configuration variables that also can be set at runtime: <br /> configuration variable: ifx.textasvarchar <br /> configuration variable: ifx.byteasvarchar <br /> runtime functions: <br /> ifx_textasvarchar(0): use blob id's for select queries with TEXT columns <br /> ifx_byteasvarchar(0): use blob id's for select queries with BYTE columns <br /> ifx_textasvarchar(1): return TEXT columns as if they were VARCHAR columns, so that you don't need to use blob id's for select queries. <br /> ifx_byteasvarchar(1): return BYTE columns as if they were VARCHAR columns, so that you don't need to use blob id's for select queries. <br /> configuration variable: ifx.blobinfile <br /> runtime function: <br /> ifx_blobinfile_mode(0): return BYTE columns in memory, the blob id lets you get at the contents. <br /> ifx_blobinfile_mode(1): return BYTE columns in a file, the blob id lets you get at the file name. <br /> If you set ifx_text/byteasvarchar to 1, you can use TEXT and BYTE columns in select queries just like normal (but rather long) VARCHAR fields. Since all strings are "counted" in PHP, this remains "binary safe". It is up to you to handle this correctly. The returned data can contain anything, you are responsible for the contents. <br /> If you set ifx_blobinfile to 1, use the file name returned by ifx_get_blob(..) to get at the blob contents. Note that in this case YOU ARE RESPONSIBLE FOR DELETING THE TEMPORARY FILES CREATED BY INFORMIX when fetching the row. Every new row fetched will create new temporary files for every BYTE column. <br /> The location of the temporary files can be influenced by the environment variable "blobdir", default is "." (the current directory). Something like: putenv(blobdir=tmpblob"); will ease the cleaning up of temp files accidentally left behind (their names all start with "blb"). <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: <b>Automatically trimming "char" (SQLCHAR and SQLNCHAR) data</b><br /> This can be set with the configuration variable <br /> ifx.charasvarchar: if set to 1 trailing spaces will be automatically trimmed, to save you some "chopping". <br /> </p></blockquote> <blockquote><p><b class="note">Note</b>: <b><b><tt>NULL</tt></b> values</b><br /> The configuration variable ifx.nullformat (and the runtime function <a href="function.ifx-nullformat.html" class="function">ifx_nullformat()</a>) when set to <b><tt>TRUE</tt></b> will return <b><tt>NULL</tt></b> columns as the string "<b><tt>NULL</tt></b>", when set to <b><tt>FALSE</tt></b> they return the empty string. This allows you to discriminate between <b><tt>NULL</tt></b> columns and empty columns. <br /> </p></blockquote> <p class="para"> <table border="5"> <caption><b>Informix configuration options</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Name</th> <th colspan="1">Default</th> <th colspan="1">Changeable</th> <th colspan="1">Changelog</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.allow_persistent</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.max_persistent</td> <td colspan="1" rowspan="1" align="left">"-1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.max_links</td> <td colspan="1" rowspan="1" align="left">"-1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.default_host</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.default_user</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.default_password</td> <td colspan="1" rowspan="1" align="left">NULL</td> <td colspan="1" rowspan="1" align="left">PHP_INI_SYSTEM</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.blobinfile</td> <td colspan="1" rowspan="1" align="left">"1"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.textasvarchar</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.byteasvarchar</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.charasvarchar</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td> <td colspan="1" rowspan="1" align="left">Removed in PHP 5.2.1.</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">ifx.nullformat</td> <td colspan="1" rowspan="1" align="left">"0"</td> <td colspan="1" rowspan="1" align="left">PHP_INI_ALL</td>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?