Re: ASP => PHP
| From: | Matthew Leingang | Date: | Wed, 06 Sep 2000 11:35:16 +0000 |
| Subject: | Re: ASP => PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15492@lists.php.net to get a copy of this message | ||
Dear Alvaro,
Can you be more specific than "DON'T WORK"? My first reaction is in the
backslashes in $cnpath. I think they should be escaped, i.e., made double
backslashes.
----------------------------------------------------------------
Matthew Leingang http://www.math.rutgers.edu/
Rutgers University leingang@math.rutgers.edu
Department of Mathematics "This signature needs no quote."
On Tue, 5 Sep 2000 alacr@carneiroramos.com.br wrote:
> Please, help me !
>
> Como transformar os comandos abaixo (ASP) para (PHP) ?
>
> In ASP :
>
> <%
> set conntemp=server.createobject("adodb.connection")
> cnpath="DBQ=" & server.mappath("alacr.mdb")
> conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath
> .
> .
> conntemp.close
> %>
>
> In PHP :
> (DON'T WORK) I tried the following :
>
> <?php
> $cnpath = "DBQ=c:\apache\wwwroot\alacr.mdb";
> $driver = "DRIVER={Microsoft Access Driver (*.mdb)}; ";
> $dsn = $driver.$cnpath;
> $usuario = "";
> $senha = "";
> $connect = odbc_pconnect($dsn, $usuario, $senha);
> .
> .
> odbc_close($connect);
> ?>
>
> Thank you
> Alvaro Luiz
>
> [ Part 35: "Included Message" ]
>