开发者

Why is PHP not recognizing my User DSN?

I have successfully set up a user DSN on system called "NZSQL"

I am able to issue SQL commands on console using:

isql NZSQL

and run queries on the remote database system.

However in PHP I am executing the following piece of code:

$connect = odbc_connect("NZSQL","username","password");


        if(is_resource($connect)){ 
           echo 开发者_运维问答"ok this is working";
        } else {
              echo "not working";
        }

I am getting a HTTP error 500 on Chrome and getting a blank screen in FF.

Oh btw I am using the code igniter framework.


If you get a white page, your PHP most likely is not working properly.

Do you get any errors? Check your PHP log. Is ODBC properly installed? Check the output of <?php phpinfo(); ?>.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜