To use the SQL Anywhere PHP extension on Windows, you must copy the DLL from the SQL Anywhere installation directory and add it to your PHP installation. Optionally, you can add an entry to your PHP initialization file to load the extension, so you do not need to load it manually in each script.
Locate the php.ini file for your PHP installation, and open it in a text editor. Locate the line that specifies the location of the extension_dir directory. If extension_dir is not set to any specific directory, it is a good idea to set it to point to an isolated directory for better system security.
Copy the file php-5.x.y_sqlanywhere.dll from the Bin32 subdirectory of your SQL Anywhere installation to the directory specified by the extension_dir entry in the php.ini file.
The string 5.x.y is the PHP version number corresponding to the version that you have installed.
If your version of PHP is more recent than the SQL Anywhere PHP extensions provided by SQL Anywhere, try using the most recent extension provided. Note that a version 5.2.x SQL Anywhere PHP extension will not work with a version 5.3.x PHP.
Add the following line to the Dynamic Extensions section of the php.ini file to load the SQL Anywhere PHP driver automatically.
where 5.x.y reflects the version number of the SQL Anywhere PHP extension copied in the previous step.
Save and close php.ini.
An alternative to automatically loading the PHP driver is to load it manually in each script that requires it. See Configuring the SQL Anywhere PHP extension.
Make sure that the Bin32 subdirectory of your SQL Anywhere installation is in your path. The SQL Anywhere PHP extension DLL requires the Bin32 directory to be in your path.
For more information, see Running PHP test scripts in your web pages.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|