php-windows Digest 16 May 2001 02:57:34 -0000 Issue 600

Topics (messages 7577 through 7596):

Re: Print directory structure.
        7577 by: Keith Ng
        7578 by: Svensson, B.A.T.
        7584 by: Daniel Beulshausen

Can't get XML Parser Class to work
        7579 by: Steve Dowell
        7593 by: Chris Sano

Help with Preg match all (newbie)
        7580 by: Michael Kelley

Re: Help with Preg match all (newbie) I think I got it
        7581 by: Michael Kelley

Custom Dll's for php
        7582 by: Darren
        7583 by: Cynic

REBUILD of PHP
        7585 by: Joshua Butcher

Trouble loading extension/module under win98
        7586 by: Michel Meyers
        7589 by: Liquidice

the /php/pear/DB abstraction
        7587 by: Dickerson, Monty

Running System Commands on NT, how do i gain a persistent connection with the prompt?
        7588 by: Isaac

Re: *.ini
        7590 by: John Taylor-Johnston
        7592 by: Ignatius Teo

setting up .phps
        7591 by: Chris Sano

Re: [PHP] Can't connect to mysql after applying MS Hotfix (originally posted to 
php-general)
        7594 by: Tyler Longren

Re: Anyone: [PHP-WIN] *.ini
        7595 by: Alan Popow

Cannot "View Source" via IE browser
        7596 by: John M

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]


----------------------------------------------------------------------


In reply to [EMAIL PROTECTED]:

> Return-Path: <[EMAIL PROTECTED]>
> Received: from toye.php.net (va.php.net [198.186.203.51])
>         by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4FE59Z12111
>         for <[EMAIL PROTECTED]>; Tue, 15 May 2001 22:05:09 +0800
> Received: (qmail 18619 invoked by uid 1013); 15 May 2001 14:07:42 -0000
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Precedence: bulk
> list-help: <mailto:[EMAIL PROTECTED]>
> list-unsubscribe: <mailto:[EMAIL PROTECTED]>
> list-post: <mailto:[EMAIL PROTECTED]>
> Delivered-To: mailing list [EMAIL PROTECTED]
> Received: (qmail 18613 invoked by uid 9); 15 May 2001 14:07:42 -0000
> To: [EMAIL PROTECTED]
> From: "Alessio Bernesco Lāvore" <[EMAIL PROTECTED]>
> Date: Tue, 15 May 2001 16:10:01 +0200
> Lines: 13
> Message-ID: <9drd7e$i5j$[EMAIL PROTECTED]>
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
> Subject: [PHP-WIN] HELP: Print directory structure.
> X-UIDL: _pi!!6+M"!']"#!:a&#!

> Could someone help me, please?

> I have to build a recursive function that print to video all the directories
> (and sub-directories and so on...)  names presents in a specified
> sub-directory on the server.

> I can't handle that function, please, i'm in panic...

> Thanks,

> Alessio.




This simple and raw code should work fine:

<?
function parse_dir($dir,$level){
        print $dir." (DIR)<BR>\n";
        $dp=opendir($dir);
        while (false!=($file=readdir($dp))){
                if ($file!="." && $file!=".."){
                        if (is_dir($dir."/".$file)) parse_dir($dir."/".$file,$level+1);
                        else print $dir."/".$file."<BR>\n";
                }
        }
}

$start_dir="c:/root";  
$level=1;

parse_dir($start_dir,$level);
?>

You could do some obvious modifications.
One impt thing to note is that the script might 'time out' if you are
listing a very huge list of dirs and files. To overcome this,
set_time_limit() might help. http://www.php.net/set_time_limit for
more info.

Hope that helps :)

Regards,
Keith Ng
_______________________________
Co-founder
K-Designs Incorporated
[EMAIL PROTECTED]

http://www.k-designs.com.sg/





Untested :-) generic algorithm for recursion:

PROCEDURE Recurce(a)
  PROCESS a
  IF <some-break-condition-true> THEN
    DO <normal program stament>
  ELSE
    DO Recurce(a)
  END IF
END

>-----Original Message-----
>From: Alessio Bernesco L`vore
>[mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, May 15, 2001 4:10 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] HELP: Print directory structure.
>
>
>Could someone help me, please?
>
>I have to build a recursive function that print to video all the
directories
>(and sub-directories and so on...)  names presents in a specified
>sub-directory on the server.
>
>I can't handle that function, please, i'm in panic...
>
>Thanks,
>
>Alessio.
>
>
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: 
>[EMAIL PROTECTED]
>




At 16:10 15.05.2001 +0200, Alessio Bernesco Lāvore wrote:
>Could someone help me, please?
>
>I have to build a recursive function that print to video all the directories
>(and sub-directories and so on...)  names presents in a specified
>sub-directory on the server.
>
>I can't handle that function, please, i'm in panic...

you can use something like the following

<?php
  function dir_to_array($dir = "./") {
    $realpath = realpath($dir);
    if(!($dir = @dir($realpath))) {
      return false;
    }

    $retval = array();
    $ignore = array("." => true, ".." => true);

    while($raw = $dir->read()) {
      if($ignore[$raw]) {
        continue;
      }

      $entry = $realpath . "\\" . $raw;
      if(!is_dir($entry)) {
        $readable  = is_readable($entry) ? 1 : 0;
        $writeable = is_writeable($entry) ? 2 : 0;
        $retval[$raw] = $readable | $writeable;
      } else {
        $retval[$raw] = dir_to_array($entry);
      }
    }

    return $retval;
  }

  $array = dir_to_array("../");
  print_r($array);
?>

daniel

/*--
daniel beulshausen - [EMAIL PROTECTED]
using php on windows? http://www.php4win.de





I am very new at using PHP and need some help.

I have downloaded several of the pre written XML Parser Classes and can't
seem to get any of them to work. They simply don't return any data.

I wrote a simple routine that calls the XML Parser and writes the output to
the browser and it works fine.

I am using PHP 4.05 on W2k Pro and IIS 5.

Any suggestions would be greatly appreciated,

Steve Dowell






Show me some snippets and I can help..

-c

""Steve Dowell"" <[EMAIL PROTECTED]> wrote in message
9drfhk$cc6$[EMAIL PROTECTED]">news:9drfhk$cc6$[EMAIL PROTECTED]...
> I am very new at using PHP and need some help.
>
> I have downloaded several of the pre written XML Parser Classes and can't
> seem to get any of them to work. They simply don't return any data.
>
> I wrote a simple routine that calls the XML Parser and writes the output
to
> the browser and it works fine.
>
> I am using PHP 4.05 on W2k Pro and IIS 5.
>
> Any suggestions would be greatly appreciated,
>
> Steve Dowell
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hello all,
I'm trying to do a name search from a string containing full names.
the format of the names is "Lastname, FirstName"
the preg expression I'm using is

preg_match_all( "/\b$searchstr.*.,.*/i", $text, $array)

This works great if you don't type in the full last name
i.e. kelle
will return my entry but kelley returns nothing.
Anyone out there that can help? I'd greatly appreciate it. Well I'm off 
to read more documentation and see if I can dig it out.
-- 

Michael Kelley                  
[EMAIL PROTECTED] 
        
Programmer/Systems Analyst I    
New Mexico State University
Information and Communication Technologies
Work # (505)-646-1374
P.O. Box 30001
MSC: 3AT
Las Cruces, NM 88003









Okay a little known fact that I left out ... each of the names has a \n 
attached to it after the first name. after reading more I found out 
about the m pattern modifier.

my pcre now looks like

preg_match_all( "/^$searchstr.*/im", $text, $array)

This seems to have gotten it.

Thanks anyway




Michael Kelley wrote:

> Hello all,
> I'm trying to do a name search from a string containing full names.
> the format of the names is "Lastname, FirstName"
> the preg expression I'm using is
> 
> preg_match_all( "/\b$searchstr.*.,.*/i", $text, $array)
> 
> This works great if you don't type in the full last name
> i.e. kelle
> will return my entry but kelley returns nothing.
> Anyone out there that can help? I'd greatly appreciate it. Well I'm off 
> to read more documentation and see if I can dig it out.


-- 

Michael Kelley                  
[EMAIL PROTECTED] 
        
Programmer/Systems Analyst I    
New Mexico State University
Information and Communication Technologies
Work # (505)-646-1374
P.O. Box 30001
MSC: 3AT
Las Cruces, NM 88003









Hi all. I have posted about this on here before but the lack of response
implies either my question wasn't clear, nobody knew the answer or everybody
ignored me :-) anyway, I will post again.

I am a fairly good C/ C++ and php programmer. However I find that php does
not have everything I need. however I have written dll's before but I
understand that they are not standard dll's but they would make a good way
to access api, so does anyone knowthe process for writing a dll which php
can use? or a good tutorial would be equally as good.

Thanks

Darren






hi there!

have you read http://www.zend.com/zend/api.php ? also, you'll get more
answers in php-dev@

On Tue, 15 May 2001 +0100, [EMAIL PROTECTED] wrote:

> Hi all. I have posted about this on here before but the lack of response
> implies either my question wasn't clear, nobody knew the answer or everybody
> ignored me :-) anyway, I will post again.
>
> I am a fairly good C/ C++ and php programmer. However I find that php does
> not have everything I need. however I have written dll's before but I
> understand that they are not standard dll's but they would make a good way
> to access api, so does anyone knowthe process for writing a dll which php
> can use? or a good tutorial would be equally as good.
>
> Thanks
>
> Darren
>
>
>
>





I do not have Visual C++, but I need a rebuild of PHP to support Graphing,
Charting and IMAP functions for my job.  Is there someone out there who can
do this build for me?

Joshua Butcher






Hi,

I have a problem with PHP (both 4.0.4pl1 and 4.0.5) because I try to load
the php_gettext.dll extension.

Unfortunately all I get is: Unable to load dynamic library
'c:\php\extensions\php_gettext.dll' - One of the library files needed to run
this application cannot be found.   This happens both when just running
PHP.EXE and running apache with the php module.

And I verified it, the file php_gettext.dll IS lying in C:\PHP\Extensions

The relevant lines in PHP.INI are:

; Directory in which the loadable extensions (modules) reside.
extension_dir = c:\php\extensions\
extension=php_gettext.dll

Strangely the same settings/configuration work under Windows 2000. Can
anybody help me or tell me what I'm doing wrong?

Greetings,
        Michel
        [EMAIL PROTECTED]






your missing a dll file..
i found that *.dll files.. alot of times require other dlls to function
right...
what i would do is open the dll file in wordpad
then hit ctrl+F (find) and look for ".dll" and write down each *.dll that's
referenced in the file.
then search for each one on your computer and make sure you have it.
this should fix it i'm positive :>
Liquidice
""Michel Meyers"" <[EMAIL PROTECTED]> wrote in message
9drv4n$m2r$[EMAIL PROTECTED]">news:9drv4n$m2r$[EMAIL PROTECTED]...
> Hi,
>
> I have a problem with PHP (both 4.0.4pl1 and 4.0.5) because I try to load
> the php_gettext.dll extension.
>
> Unfortunately all I get is: Unable to load dynamic library
> 'c:\php\extensions\php_gettext.dll' - One of the library files needed to
run
> this application cannot be found.   This happens both when just running
> PHP.EXE and running apache with the php module.
>
> And I verified it, the file php_gettext.dll IS lying in C:\PHP\Extensions
>
> The relevant lines in PHP.INI are:
>
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = c:\php\extensions\
> extension=php_gettext.dll
>
> Strangely the same settings/configuration work under Windows 2000. Can
> anybody help me or tell me what I'm doing wrong?
>
> Greetings,
>         Michel
>         [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Before I had difficulty using the pear/DB database abstraction (which comes
with php since 4.04p1 at least) and had asked the list about it; the problem
was merely a permissions issue.  It works fine, and is documented inline.

However, the pear/DB class needs enhancement to better report error messages
from mssql (the message it had reported was ambiguous compared to what the
plain mssql functions return).  Such ambiguity could dissuade some early
adopters of the pear classes.

My thanks to the authors, Stig Bakken <[EMAIL PROTECTED]>, Sterling Hughes
<[EMAIL PROTECTED]>, James L. Pine <[EMAIL PROTECTED]>, et. al., for writing
this code.

If there is a FAQ-o-matic, BBS or weblog on the DB.php class and its
includes, please point me in that direction!  
I think this is a positive step for php. 

Maybe certain PCMAG reviewers will take note of its presence someday..  ;)
 
montyd







PHP4.0.4pl1, Apache 1.3.12 on Windows2000:

Hi all, I am trying to run ANT, CVS and a few other command line utils from
a PHP web wrapper, the problem is for programs like CVS, there is a login,
in other words:
from the prompt:
"cvs login <username>"
cvs returns a request for the password, now, how do i open the above command
in a way that allows me to enter the password and continue on, reading and
writing to the same 'shell instance' more or less, basiclly the problem is
that I cannot get the excuting script to see me as real user rather than
some nobody at localhost, if I could make php/apache run as a specific user
with all their permission etc, that would be great and i wouldnt need a
persisnt prompt...any help out there?

p.s. obviously the win 'runas' command also requires a password so same
question there...
thanks
-Ike






Hi and thanks, but it won't work on Windows. here is a copy of the problem I
sent to its author. If anyone can help or has another class I can try, I
would appreciate it.

John

-----------------------------------------------------------------------------------------

I think I have found a bug with cIniFileReader.inc (Fresh
download today from:
http://phpclasses.upperdesign.com/browse.html/package/204
) I'm using

        PHP 4.0.5 [738Kb] - 30 April 2001

Located at: http://php.net/downloads.php

Does your cIniFileReader.inc class function with Windows? Do you have a
Windows version? Does cIniFileReader.inc presently support Windows?

I have used your testinifilereader.php3 but it will not read my test.ini,
file located in t:\cd\test.ini

Borrowing your syntax, I echoed this to be sure:
            echo $DOCUMENT_ROOT."/test.ini";

And it reads back:
            T:\\cd/test.ini

There is definitely a mix of Unix and Windows syntax here?

None of these appear to work:
          -  Test find the value for a given key and section
          -  Test find all keys for a given section
          -  Test find all sections in the ini file

But when I do this:
           Test add a key/value pair to the given section

It does write a section, key and a value in my T:\cd\test.ini,
but it also gives this error:

            Warning: Undefined variable: OS in
T:\cd\library\classes\cIniFileReader.inc on line 161

I assume it is weirding out on this:

        if (substr($OS, 0, 3) == "Win") {
            // windows environment
            $newline = "\r\n";
        } else {
            // other environment.  assume *nix
            $newline = "\n";
        }

I can tell you it is definitely writing just \n and not \r\n to the
test.ini, therefore defaulting to the else string.

What is the $OS variable?

Thanks,

John

> Have a look @ http://phpclasses.upperdesign.com/browse.html/package/204
> U have 2 register, but it's 4 free. Very usefull site.





Actually, it does work under Windows...

It's how you've passed the path to it that's the problem.

Try t:/cd/test.ini instead of t:\cd\test.ini. If you insist on using the
latter form, you need to escape the \ as \\ so it reads t:\\cd\\test.ini

Ignatius


-----Original Message-----
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 May 2001 10:58
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] *.ini


Hi and thanks, but it won't work on Windows. here is a copy of the problem I
sent to its author. If anyone can help or has another class I can try, I
would appreciate it.

John

----------------------------------------------------------------------------
-------------

I think I have found a bug with cIniFileReader.inc (Fresh
download today from:
http://phpclasses.upperdesign.com/browse.html/package/204
) I'm using

        PHP 4.0.5 [738Kb] - 30 April 2001

Located at: http://php.net/downloads.php

Does your cIniFileReader.inc class function with Windows? Do you have a
Windows version? Does cIniFileReader.inc presently support Windows?

I have used your testinifilereader.php3 but it will not read my test.ini,
file located in t:\cd\test.ini

Borrowing your syntax, I echoed this to be sure:
            echo $DOCUMENT_ROOT."/test.ini";

And it reads back:
            T:\\cd/test.ini

There is definitely a mix of Unix and Windows syntax here?

None of these appear to work:
          -  Test find the value for a given key and section
          -  Test find all keys for a given section
          -  Test find all sections in the ini file

But when I do this:
           Test add a key/value pair to the given section

It does write a section, key and a value in my T:\cd\test.ini,
but it also gives this error:

            Warning: Undefined variable: OS in
T:\cd\library\classes\cIniFileReader.inc on line 161

I assume it is weirding out on this:

        if (substr($OS, 0, 3) == "Win") {
            // windows environment
            $newline = "\r\n";
        } else {
            // other environment.  assume *nix
            $newline = "\n";
        }

I can tell you it is definitely writing just \n and not \r\n to the
test.ini, therefore defaulting to the else string.

What is the $OS variable?

Thanks,

John

> Have a look @ http://phpclasses.upperdesign.com/browse.html/package/204
> U have 2 register, but it's 4 free. Very usefull site.


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





How do I set up .phps files in windows? I'm running IIS5.0 on win2k. Any
help would be appreciated, thanks!






The original message was posted to php-general...I got no replies...anybody
here know what's up with this?

The code that kills inetinfo.exe in Win2k is @ the end of this message.

> -----Original Message-----
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 15, 2001 3:37 PM
> To: PHP-General
> Subject: [PHP] Can't connect to mysql after applying MS Hotfix
>
>
> Hello everybody,
>
> Lastnight, I was building a site.  Multiple SQL queries were being made on
> every page.  Everything worked nice and smooth.  I downloaded and applied
> the patch for MS01-026 which effects IIS 4.0 and 5.0.  I rebooted after
> applying the hotfix, and after that, NONE of my php scripts can connect to
> mysql.  It's not a problem with mysql, because I can successfully
> connect to
> mysql through the client and can execute queries.
>
> Anybody know what's up with this?
>
> Also, while playing around lastnight...I wrote some weird code that kills
> inetinfo.exe on Win2k boxes.  It's attached if anyone wants to look @ it
> (please do and see if you get the same results).

Code to kill inetinfo.exe:
<?
/*
This was written by Tyler Longren <[EMAIL PROTECTED]>.
This was found on accident...thanks to my crappy coding.  :)
Date: 05-14-2001
Kills: Inetinfo.exe on Win2k
*/
session_start();
session_register('username');
session_register('password');
header("Location: $PHP_SELF");
if ($formusername) {
        mysql_connect("$mysql_host","$mysql_user","$mysql_pass");
        mysql_select_db("$mysql_db");
        $auth_sql = mysql_query("SELECT * FROM $mysql_user_table WHERE username =
'$formusername' AND password = '$formpassword'");
        $user_exists = mysql_num_rows($auth_sql);
        if ($user_exists == "1") {
                $username = $formusername;
                $password = $formpassword;

        }
        else {
                $login_error = "<font face=Arial size=2><b>Error:</b></font><br><font
face=Arial size=1>Wrong<br>username/password</b></font>";
                session_unregister('username');
                session_unregister('password');
        }

}
else {
        mysql_connect("$mysql_host","$mysql_user","$mysql_pass");
        mysql_select_db("$mysql_db");
        $auth_sql = mysql_query("SELECT * FROM $mysql_user_table WHERE username =
'$username' AND password = '$password'");
        $user_exists = mysql_num_rows($auth_sql);
        if ($user_exists == "1") {
                // blah blah blah!
        }
        else {
                $login_error = "<font face=Arial size=2><b>Error:</b></font><br><font
face=Arial size=1><b>Wrong<Br>username/password</b></font>";
                session_unregister('username');
                session_unregister('password');
        }
}
if ($login == "no") {
        session_destroy();
        session_unregister('username');
        session_unregister('password');
        header("Location: $PHP_SELF");
}
?>





On Tue, 15 May 2001 02:19:52 -0400, you wrote:

>>[StoreData]
>>Name=Ben Hurr
>
>Has anyone a few lines of code that could help read a couple of variables in an
>*.ini file?

Here's something I did in a hurry. It can be greatly improved, but it
appears to work. The class is called IniReader. I put it into an include
file called inireader.inc.php, so that's why the example shows that as an
include line. The constructor takes 3 parameters - the file name, the
section heading, and the variable desired. See the example which returns
"United States".

First the example code (real short):

=================================

<?php
        include('inireader.inc.php');

        $ini = new IniReader('c:\windows\win.ini', '[intl]', 'scountry');
        $ini->findvalue();
        if ($ini->errorval == 0)
        {
                if (empty($ini->requiredvalue))
                        print("Not found or blank.<BR>");
                else
                        print($ini->requiredvalue."<BR>");
        }
        else
                print("Error #".$ini->errorval." encountered.<BR>");
?>

=================================

Now the class itself - (bigger, but not huge): it should be improved with
better error handling, but as a first pass.... what the heck:
Read it carefully, because word-wrap (yours or mine or both) is probably
going to mess it up pretty good.

=================================

<?php

class IniReader
{
        var $filename;
        var $sectionkey;
        var $varkey;
        var $errorval;
        var $linearray;
        var $requiredvalue;

//      constructor takes name of ini file (with path) - ie
"c:\windows\win.ini",
//      section - ie "[intl]",
// variable to resolve - ie "sCountry"
// with above, on my system, should return "United States"

        function IniReader($filename = "", $sectionkey = "", $varkey = "")
        {
                $this->filename = $filename;
                $this->sectionkey = $sectionkey;
                $this->varkey = $varkey;
                $this->errorval = 0;
                $this->requiredvalue = "";
                $this->linearray = array("");
        }

        // function to pull ini file into an array
        function getfilearray()
        {
                if (empty($this->filename))
                        $this->errorval = 1;            // no filename provided
                elseif (!is_file($this->filename))
                        $this->errorval = 2;            // no such file (or invalid 
filename)
                else
                        $this->linearray = file($this->filename);
        }

        function findvalue()
        {
                $this->getfilearray();          // load up array with ini file

                if ($this->errorval == 0)               // seems ok
                {
                        if (empty($this->sectionkey))
                                $this->errorval = 3;            // no sectionkey 
provided
                        else
                        {
                                $eleval = current($this->linearray);            // get 
1st line of file
(array element 0)

                                // watch for end of file and look for sectionkey 
requested
                                while (!($eleval === false) and
                                                (strncasecmp($eleval, 
$this->sectionkey,
strlen($this->sectionkey)) != 0))
                                        $eleval = next($this->linearray);              
 // not found, so continue

                                $eleval = next($this->linearray);               // 
move to next line (could be
eof)

                                // watch for eof and only go until next section header 
encountered
                                // if next section header found, then requested 
variable value not
in this section,
                                // so don't bother continuing
                                while (!($eleval === false) and 
(strcmp(substr($eleval, 0, 1), "[")
!= 0))
                                {
                                        // did we find the variable desired?
                                        if (strncasecmp($eleval, $this->varkey, 
strlen($this->varkey)) ==
0)
                                        {
                                                // yes, so put it into 
this->requiredvalue and quit looking
                                                $tmpval = stristr($eleval, "=");

                                                if (!($tmpval === false))   // no 
value at all??? ok, possible
                                                        $this->requiredvalue = 
trim(substr($tmpval, 1, strlen($tmpval)
- 1));

                                                break;
                                        }
                                        else            // not found yet so continue
                                                $eleval = next($this->linearray);
                                }
                        }
                }
        }
}

?>

==============================================


>Thanks,
>
>John
>
>Alan Popow wrote:
>
>> On Mon, 14 May 2001 21:48:54 -0400, you wrote:
>>
>> Ahh.. Ok. I see what you're getting at.
>>
>> While I haven't tried it, it probably wouldn't be a lot of code to create a
>> function to do it using file() to read the .ini file into an array and then
>> using array_search() to find the required information.
>>
>> Alan
>>
>> >There is no procedure in place, no one has created a module to ... to read ...
>> >say ...
>> >
>> >[StoreData]
>> >Name=Ben Hurr
>> >
>> >Not that I'm going to go Perling just for this, but ...
>> >
>> >??
>> >John
>> >
>> >Alan Popow a écrit :
>> >
>> >> On Mon, 14 May 2001 18:30:48 -0400, you wrote:
>> >>
>> >> A *.ini file is just a common garden variety text file. Read it however you
>> >> read any other text file.
>> >>
>> >> Alan
>> >>
>> >> >How can I read the contents of an *.ini file?
>> >> >Is there an example kicking around that I did not see?
>> >> >
>> >> >Thanks,
>> >> >
>> >> >John
>> >> >
>> >> >--
>> >> >John Taylor-Johnston
>> >> >Langues Modernes
>> >> >poste 289
>> >>
>> >> --
>> >> PHP Windows Mailing List (http://www.php.net/)
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> >
>> >--
>> >John Taylor-Johnston
>> >Langues Modernes
>> >poste 289
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Hi there,

Ever since I installed PHP4 on my PC, I cannot "view source" via my
IE5 explorer.  I get a weird error:

"Cannot open the php_submit.php C:\WINDOWS\Temporary Internet
Files\Content.IE5\8H2R8DMR\bugs(1).txt file.
Make sure a disk is in the drive you specified."

For every page I try, the above message ONLY CHANGES where the "filename" is
specified.  The "php_submit.php" always appears.

Now I have checked Microsoft's site and cannot find an answer, so I thought
I'd try here.
I have yet to check ALL of PHP-newsgroups but will.

I appreciate any assistance on this.

Thanks.
  John M.




Reply via email to