php-windows Digest 12 Oct 2003 09:08:19 -0000 Issue 1952

Topics (messages 21756 through 21759):

Re: php with MS Acces
        21756 by: hubo

To compile PHP under VC .NET (VC 7) or not ?
        21757 by: Emmanuel Tatto

passing variables
        21758 by: Peter Gerwing

Re: I can't make a 'read_tag.php' file
        21759 by: Bas

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Which line is the #13 (and #21, #25 resp.) in your code?

"Masterblue" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> I tried the code below but i got an error ,
> Im on a win2000 machine and I use php 4.3.3
> Could someone help me out please!!!
>
> ----- Code -----
> $db = '\\\\server\\resource\\db.mdb';
> $conn = new COM('ADODB.Connection');
> $conn->Open("DRIVER={Driver do Microsoft Access (*.mdb)}; DBQ=$db");
>
> // Driver do Microsoft Access (*.mdb)
> // must be the name in your odbc drivers, the one you get
> // from the Data Sources (ODBC).
> // In this case, I'm in Mexico but the driver name is in portuguese,
thanks Microsoft.
>
> $sql = 'SELECT username FROM tblUsuarios';
> $res = $conn->Execute($sql);
> while (!$res->EOF)
> {
>     print $res->Fields['username']->Value . "<br>";
>     $res->MoveNext();
> }
>
> $res->Close();
> $conn->Close();
> $res = null;
> $conn = null;
> ----- End Code -----
>
> ---The error ---
>
> Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft
> OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft
> Access Driver]General error Unable to open registry key 'Temporary
> (volatile) Jet DSN for process 0x5d8 Thread 0x1c4 DBC 0xae82f4 Jet'. in
> E:\database.php on line 13
>
> Warning: (null)(): Invoke() failed: Exception occurred. Source:
> ADODB.Connection Description: Operation is not allowed when the object is
> closed. in E:\database.php on line 21
>
>
> Fatal error: Call to a member function on a non-object in E:\database.php
on
> line 25
>
> ---End of The error ---
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi,
 
I would like to compile PHP, under win32, with EAPI, but it seems that PHP will not 
compile fine under VC .NET (aka VC 7), since MS made some in the C/C++ include files 
(for exemple, no more iostream.h, like needed by COM.c in the PHP ext).
So, is there someone who knows a way to get it right with VC 7 ???
 
Thx




---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail

--- End Message ---
--- Begin Message ---
I have 2 files one is a php file the other is an include file which has all
the html in it

The php fil calls up the include file to the browser no problem. When I fill
in the cells it seems that the values are not being passed from the submit
method post through back to the php file which needs to do login checks and
add the variable to the login file if it passes it's tests.

Why does the login.inc file only run the switch default: only. It's like the
variables go off into thin air and don't go through the switch cause they
aren't there and of course it will only do the default switch cause the
variable are lost

any help. is it still a problem of configuring php etc
Peter

--- End Message ---
--- Begin Message ---
I forget to say the structure of the test.tag file:

<bttag=name>
Data
</bttag>
<bttag=name2>
Data for name2
</bttag>
<bttag=close>
Closing...
</bttag>

I hope this will help you figure out a solution.
I think(from debug mode) that my calculation
$lengthofstr
is the problem.

Thanks,

Bas
"Bas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have found that this script doesn't work:
>
> read_tag.php
>
> ---
> <?php
>
> function readTag($filename, $tagtype, $debug = 0) {
> $filedata = file_get_contents($filename);
> $tagrealname = "<bttag=";
> $tagrealname .= $tagtype;
> $tagrealname .= ">";
>
> $tagdata = stristr($filedata, $tagrealname);
> $posofend = strpos($tagdata, "</bttag>");
> $length = strlen($tagdata);
> $lengthoftag = strlen($tagrealname);
> $lengthofend = strlen("</bttag>");
> $lengthofstr = $length - $posofend - $lengthoftag;
> $returndata = substr($tagdata, $lengthoftag, $lengthofstr);
> if ($debug == 1) {
> echo "<br>Length = " . $length;
> echo "<br>Of Tag = " . $lengthoftag;
> echo "<br>Of Str = " . $lengthofstr;
> echo "<br>Of End = " . $posofend;
> echo "<br>TagData:<br>" . $tagdata;
> }
> return $returndata;
> }
> ?>
>
> <HTML>
> <BODY>
> <h1>Test readTag-functie</h1>
> <?php echo readTag("test.tag", "bassie", 1); ?>
> </body>
> </html>
>
> ---
> And with this, it needs the file 'test.tag'
> ---
> <bttag=bassie>
> I am myself!!
> </bttag>
> <bttag=test>
> This is a test!!!
> </bttag>
> <bttag=welcome>
> Welcome!!!
> </bttag>
> <bttag=close>
> Closing!!!
> </bttag>
> ---
> The first parameter of the readTag function is the filename of the tag
file.
> The second is the tag to search for an the third is the debug mode.
>
> The error is that if i load this, the readTag function returns everything
> except for the Closing!!!
>
> What's wrong?

--- End Message ---

Reply via email to