Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (中文) » SQL Anywhere 服务器 - 编程 » PHP 支持 » SQL Anywhere PHP 扩展 » 在 Web 页中运行 PHP 测试脚本

 

访问测试 Web 页

以下过程介绍安装并配置 PHP 和 SQL Anywhere PHP 扩展后如何通过 Web 浏览器查看测试页。

 ♦  查看 Web 页
  1. 重新启动 Web 服务器。

    例如,要启动 Apache Web 服务器,可从 Apache 安装目录的 bin 子目录运行以下命令:

    apachectl start
  2. 在 Linux 或 Mac OS X 上,使用提供的脚本之一来设置 SQL Anywhere 环境变量。

    根据您使用的 shell,输入相应的命令从 SQL Anywhere 安装目录找到 SQL Anywhere 配置脚本:

    在此 shell 中…… ... 使用此命令
    sh、ksh 或 bash . /bin32/sa_config.sh
    csh 或 tcsh source /bin32/sa_config.csh
  3. 启动 SQL Anywhere 数据库服务器。

    例如,要访问上述测试 Web 页,请使用以下命令启动 SQL Anywhere 示例数据库。

    dbeng12 samples-dir\demo.db
  4. 要通过与服务器运行在同一计算机上的浏览器访问测试页,请输入以下 URL:

    对于此测试页…… ... 使用的 URL
    info.php http://localhost/info.php
    sa_test.php http://localhost/sa_test.php

    如果每项配置均正确,则 sa_test 页会显示 Employees 表的内容。