php-general Digest 9 Jul 2003 10:09:21 -0000 Issue 2165

Topics (messages 154447 through 154512):

preg_replace - understanding
        154447 by: Micah Montoy
        154452 by: Kevin Stone
        154453 by: Micah Montoy
        154454 by: Jennifer Goodie
        154455 by: Micah Montoy
        154456 by: Micah Montoy
        154512 by: Ford, Mike               [LSS]

Re: Stumper: Get Variable Name
        154448 by: Mike Migurski

Alex,Joe - >Re: [PHP] New Krysalis version released
        154449 by: Ryan A
        154450 by: Joe Harman

Re: XML
        154451 by: Ray Hunter

Object assignment
        154457 by: Matt Grimm
        154461 by: Martin Towell
        154464 by: Tom Rogers

seeing strange things?
        154458 by: Micah Montoy
        154459 by: Micah Montoy

[ML] Are there any announcement rules for this list? (was Re: [PHP] Re: NEW SPAMMER 
...)
        154460 by: Joel Rees
        154467 by: Robert Cummings
        154477 by: Richard Baskett

how to force variables declaration??
        154462 by: mack paul
        154463 by: Martin Towell
        154466 by: David Nicholson

session data missing
        154465 by: ulf sundin

Annoucement Idea
        154468 by: Joe Harman
        154506 by: Alexandru COSTIN

Re: __get, __set, __clone
        154469 by: Greg Beaver

Re: Incrementing counter from an HTML page.
        154470 by: Student4

Re: include/require inside of function
        154471 by: Ow Mun Heng

Text boxes posted to MySQL record that contain quotes
        154472 by: Vernon
        154474 by: electroteque
        154475 by: electroteque
        154476 by: Burhan Khalid
        154478 by: electroteque
        154480 by: Vernon
        154490 by: gamin

Re: New to PHP
        154473 by: Ow Mun Heng

Re: PHP4 and PHP5 at one machine
        154479 by: Burhan Khalid
        154496 by: Milan Reznicek

PHP forum
        154481 by: Richard Baskett
        154484 by: PHP4 Emailer

How configure PHP parser 4.3.x in IIS version 6.0?
        154482 by: o_j_p_p.icnet.com.ve
        154492 by: Roberto Ramírez

getting part of a string
        154483 by: Micah Montoy
        154486 by: ulf sundin
        154487 by: Micah Montoy

Anchor lost in header redirect
        154485 by: Yasha Nisanov

simple ereg() question
        154488 by: gamin
        154491 by: Eddy-Das

movement on a page
        154489 by: Micah Montoy
        154493 by: Yasha Nisanov
        154501 by: Micah Montoy

Re: Having problems with an IF statement, just doesn't make sense
        154494 by: Nadim Attari

accesing php script in a different port
        154495 by: Michael P. Carel
        154498 by: Ray Hunter

Re: NEW SPAMMER -> [PHP] New Krysalis version released
        154497 by: Alexandru COSTIN

Re: what's wrong with this?????
        154499 by: Nadim Attari

Create a Report
        154500 by: cavagnaro

Re: Sessions
        154502 by: Dave Alger

Re: output compression and MSIE
        154503 by: sebab.dialcom.com.pl
        154505 by: Mario Oberrauch

Multiple upload files with php
        154504 by: Francisco Morales

Multiple upload files with php problem!!
        154507 by: Francisco Morales
        154511 by: Sævar Öfjörð

picture(s) in Excel
        154508 by: jan
        154509 by: cavagnaro

Using PHP with windows logon
        154510 by: Brenton Dobell

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 ---
I'm trying to understand how the code works within the preg_replace function
but the manual is just obscure as the examples are.  Anyway, I am looking to
use it to replace "\\" in a string with "/" and I can not figure how how.
At first, I thought I could just do:

$filevalue = preg_replace("'\\', /", $filevalue);

but it doesn't do anything.  If someone could relate what it is and what the
parts mean between the (), I would appreciate it.

thanks



--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Micah Montoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 4:01 PM
Subject: [PHP] preg_replace - understanding


> I'm trying to understand how the code works within the preg_replace
function
> but the manual is just obscure as the examples are.  Anyway, I am looking
to
> use it to replace "\\" in a string with "/" and I can not figure how how.
> At first, I thought I could just do:
>
> $filevalue = preg_replace("'\\', /", $filevalue);
>
> but it doesn't do anything.  If someone could relate what it is and what
the
> parts mean between the (), I would appreciate it.
>
> thanks

You're not using the function correctly.  You've got the search string and
replace string tied up into one input there.  They need to be separate.

$filevalue = preg_replace('\\', '/', $filevalue);
http://www.php.net/manual/en/function.preg-replace.php

However you should consider using the str_replace() function in your case
since you aren't doing any pattern matching and it's a lot faster than
preg_replace().

$filevalue = str_replace('\\'. '/', $filevalue);
http://www.php.net/manual/en/function.str-replace.php

--
Kevin



--- End Message ---
--- Begin Message ---
I took a look at the str_replace function and it will work but I am getting
a weird thing happening now.  When I do:

$filevalue = str_replace("\\", "/", $filevalue);

it is reversing the "\\" to "//" but not replacing them with just a single
"/".

What may be causing this?

thanks


"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> ----- Original Message -----
> From: "Micah Montoy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 08, 2003 4:01 PM
> Subject: [PHP] preg_replace - understanding
>
>
> > I'm trying to understand how the code works within the preg_replace
> function
> > but the manual is just obscure as the examples are.  Anyway, I am
looking
> to
> > use it to replace "\\" in a string with "/" and I can not figure how
how.
> > At first, I thought I could just do:
> >
> > $filevalue = preg_replace("'\\', /", $filevalue);
> >
> > but it doesn't do anything.  If someone could relate what it is and what
> the
> > parts mean between the (), I would appreciate it.
> >
> > thanks
>
> You're not using the function correctly.  You've got the search string and
> replace string tied up into one input there.  They need to be separate.
>
> $filevalue = preg_replace('\\', '/', $filevalue);
> http://www.php.net/manual/en/function.preg-replace.php
>
> However you should consider using the str_replace() function in your case
> since you aren't doing any pattern matching and it's a lot faster than
> preg_replace().
>
> $filevalue = str_replace('\\'. '/', $filevalue);
> http://www.php.net/manual/en/function.str-replace.php
>
> --
> Kevin
>
>



--- End Message ---
--- Begin Message ---
> $filevalue = str_replace("\\", "/", $filevalue);
>
> it is reversing the "\\" to "//" but not replacing them with just a single
> "/".

I think you need to escape your \ so each \ is \\ so your string should be
"\\\\"



--- End Message ---
--- Begin Message ---
You where right.  That's what it was doing but now its not reversing the
direction.  It at least is a single "\".  Have an idea for reversing it.  I
played with it a bit but still no go on this.

thanks


----- Original Message ----- 
From: "Jennifer Goodie" <[EMAIL PROTECTED]>
To: "Micah Montoy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 5:43 PM
Subject: RE: [PHP] preg_replace - understanding


> > $filevalue = str_replace("\\", "/", $filevalue);
> >
> > it is reversing the "\\" to "//" but not replacing them with just a
single
> > "/".
>
> I think you need to escape your \ so each \ is \\ so your string should be
> "\\\\"
>
>
>



--- End Message ---
--- Begin Message ---
Never mind.  Its working.

thanks

----- Original Message ----- 
From: "Jennifer Goodie" <[EMAIL PROTECTED]>
To: "Micah Montoy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 5:43 PM
Subject: RE: [PHP] preg_replace - understanding


> > $filevalue = str_replace("\\", "/", $filevalue);
> >
> > it is reversing the "\\" to "//" but not replacing them with just a
single
> > "/".
>
> I think you need to escape your \ so each \ is \\ so your string should be
> "\\\\"
>
>
>



--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Jennifer Goodie [mailto:[EMAIL PROTECTED]
> Sent: 09 July 2003 00:43
> 
> > $filevalue = str_replace("\\", "/", $filevalue);
> >
> > it is reversing the "\\" to "//" but not replacing them 
> with just a single
> > "/".
> 
> I think you need to escape your \ so each \ is \\ so your 
> string should be
> "\\\\"

Or use single quotes for your strings:

  $filevalue = str_replace('\\', '/', $filevalue);

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211

--- End Message ---
--- Begin Message ---
>I want to be able to e-mail myself the name of the variable that bombed
>out and the line that it was on (as well as the filename) if possible.
>Don't really know where to start... looks like this:

You can use PHP's predefined constants in an assertion, and
debug_backtrace().

http://www.php.net/manual/en/language.constants.predefined.php
http://www.php.net/debug_backtrace

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca            http://mike.teczno.com/contact.html


--- End Message ---
--- Begin Message ---
Hi,
I never said that it isnt a good product, heck it sounds like its a great
product...
I myself am a newbie here (a few months) pretty new to php compared to a lot
of guys here but have created some commercial scripts...imagine the old
fossils :-) here who have created loads of good scripts?
I just think that if someone asks for something _then_ recomend your product
in your reply.
In this case if someone said "hey, am new to xml/xsl in php can anybody
help" then someone could have said "read blah and blah and heres a great
product from Alenandru at <website> check it out..." or something to that
effect
It just seems to be a pain in the .... when everytime someone has written
something we get an announcement, everyone has ideas and there is a hell of
a lot of good stuff out there...but...

When i start looking into XML/XSL I will give that a look see and probably
ask this list for advise but till then I think this is kind of "passive
spamming" or atleast an overload of (as of now) unwanted info, I am sure it
will be useful and of great value if its free or not but till someone asks
for the info....

-Ryan


----- Original Message -----
From: "Alexandru COSTIN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 9:22 PM
Subject: [PHP] New Krysalis version released


>     Hello,
>     For the ones interested in XML/XSL publishing with PHP, we've just
> released the Krysalis 2.4.1 version.
>
>     Includes a lot of features, fixes and performance improvements.
>     Check http://www.interakt.ro/index_news_162.html for more details.
>
>     Our XML-schema support is being worked right now for inclusion in
PEAR -
> contact us if you want to contribute - we still need some PEARyfication
> help.
>
>                     Alexandru
>
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 312 5312
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
Yeah Ryan... I actually agree with the passive spamming issue...
Actually spamming in general... And don't take any offense to my
comments... LOL... Cause they totally weren't ment that way... Have a
great one!

Respectfully,
Joe

-----Original Message-----
From: Ryan A [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2003 6:19 PM
To: Alexandru COSTIN
Cc: Joe Harman; [EMAIL PROTECTED]
Subject: [PHP] Alex,Joe - >Re: [PHP] New Krysalis version released


Hi,
I never said that it isnt a good product, heck it sounds like its a
great product... I myself am a newbie here (a few months) pretty new to
php compared to a lot of guys here but have created some commercial
scripts...imagine the old fossils :-) here who have created loads of
good scripts? I just think that if someone asks for something _then_
recomend your product in your reply. In this case if someone said "hey,
am new to xml/xsl in php can anybody help" then someone could have said
"read blah and blah and heres a great product from Alenandru at
<website> check it out..." or something to that effect It just seems to
be a pain in the .... when everytime someone has written something we
get an announcement, everyone has ideas and there is a hell of a lot of
good stuff out there...but...

When i start looking into XML/XSL I will give that a look see and
probably ask this list for advise but till then I think this is kind of
"passive spamming" or atleast an overload of (as of now) unwanted info,
I am sure it will be useful and of great value if its free or not but
till someone asks for the info....

-Ryan


----- Original Message -----
From: "Alexandru COSTIN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, July 08, 2003 9:22 PM
Subject: [PHP] New Krysalis version released


>     Hello,
>     For the ones interested in XML/XSL publishing with PHP, we've just

> released the Krysalis 2.4.1 version.
>
>     Includes a lot of features, fixes and performance improvements.
>     Check http://www.interakt.ro/index_news_162.html for more details.
>
>     Our XML-schema support is being worked right now for inclusion in
PEAR -
> contact us if you want to contribute - we still need some 
> PEARyfication help.
>
>                     Alexandru
>
> --
> Alexandru COSTIN
> Chief Operating Officer
> http://www.interakt.ro/
> +4021 312 5312
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
I see that not many sites require the use of xml/xsl(t). Many sites can
just use html and database to accomplish 99.9% of the work.

I always suggest that when you have tons of data that you need to send
to the user that it is a good idea. Especially now that xslt is growing
up :)

I like to use xml and xsl for various reasons, mainly i can really
separate the logic and presentation. All data is keep in the xml file
and presentation in the xsl file. So when i need to make changes in the
presentation then i only change the xsl file and never really have to
touch the logic (php) code. This is really, really great for some sights
that are extremely complex.

Also in php i can create standards that my xml files will follow (dtds,
schema) and allowing me to create modules (functionality) very
efficiently and timely.

Also as mentioned xml provides a format for transfering data. However, i
would not use it with databases unless it is large amounts of data.
However, i have used xml for creating sql queries and setting up
configureation files which are extremely reliabe.

--
BigDog



On Tue, 2003-07-08 at 15:51, Jeff Harris wrote:
> |-----Original Message-----
> |From: Petre Agenbag [mailto:[EMAIL PROTECTED]
> |Sent: Tuesday, July 08, 2003 6:27 AM
> |To: [EMAIL PROTECTED]
> |Subject: [PHP] XML
> |
> |
> |Hi List
> |
> |Firstly, this question is arguable more about XML than PHP, but they are
> |interlinked, so I hope it is "topical" for this list.
> |
> |Firstly, Where I come from:
> |
> |I am VERY comfortable with PHP/MySQL on Linux and understand all those
> |concepts.
> |
> |Now I'm trying to see the benefits of XML, and quite frankly, I just
> |cannot see why one would want to use it...
> |
> [snip]
> 
> On Jul 8, 2003, "Joe Harman" claimed that:
> 
> |Okay Petre... You have asked the question that I always wanted to ask!!!
> |I can't wait to see peoples answer... I simply can't find a use for it
> |either....
> |
> |Joe
> 
> This probably should be on another list, but it might give someone an idea
> on how to create something in PHP. I've been trying to figure out if some
> of what I'm doing would be good for XML. The answer for that is "no, use a
> database."
> 
> It seems to me, that XML is a way of encoding data for the transmission
> between two processors. For example, the database uses XML to transfer
> data to the PHP engine. The weather magnet uses XML to transmit
> information to your PHP script, which parses it and produces the HTML
> output. My page asks your script for some information, and it's returned
> as well-formed XML.
> 
> As far as using an XML file to act as a database and your parser to create
> the HTML, it's probably better to use a database.
> 
> Jeff
> (my $.015 [after taxes] )
> -- 
> Registered Linux user #304026.
> "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
> Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
> Responses to this message should conform to RFC 1855.
> 
> 


--- End Message ---
--- Begin Message ---
I'm having trouble creating objects with DOMXML.  As I loop through a level
of nodes, I'm creating a new element based on the array's key name.  The XML
might look like this:

<rootElement>
  <record id="1">Value 1</record>
  <record id="2">Value 2</record>
</rootElement>

So I'd be doing this with DOMXML in a loop:

$thisChild = $doc->create_element($key);
$thisChild = $ancestor->append_child($thisChild);

Where $key is 'record' in this example, and $ancestor is 'rootElement',
which is carried along in the function.

The problem that when I reach the second element by the same name, and in
the same node level, I'm overwriting the $thisChild object that I just
created.  How can I dynamically name these objects so that I can have an
indeterminate number of elements by the same name, in the same level?

Source:
http://www.healthtvchannel.org/test/php2xml.phps

Thanks,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org



--- End Message ---
--- Begin Message ---
Since I can't see the source for append_child(), I'll assume you're using
the $key as the index??

If so, try changing it to just a numeric index, ie, 0, 1, 2, etc.

HTH
Martin

-----Original Message-----
From: Matt Grimm [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 July 2003 10:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Object assignment


I'm having trouble creating objects with DOMXML.  As I loop through a level
of nodes, I'm creating a new element based on the array's key name.  The XML
might look like this:

<rootElement>
  <record id="1">Value 1</record>
  <record id="2">Value 2</record>
</rootElement>

So I'd be doing this with DOMXML in a loop:

$thisChild = $doc->create_element($key);
$thisChild = $ancestor->append_child($thisChild);

Where $key is 'record' in this example, and $ancestor is 'rootElement',
which is carried along in the function.

The problem that when I reach the second element by the same name, and in
the same node level, I'm overwriting the $thisChild object that I just
created.  How can I dynamically name these objects so that I can have an
indeterminate number of elements by the same name, in the same level?

Source:
http://www.healthtvchannel.org/test/php2xml.phps

Thanks,
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: [EMAIL PROTECTED]
Web: www.healthtvchannel.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ Information from NOD32 1.452 (20030703) __________

This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com




--- End Message ---
--- Begin Message ---
Hi,

Wednesday, July 9, 2003, 10:38:22 AM, you wrote:
MG> I'm having trouble creating objects with DOMXML.  As I loop through a level
MG> of nodes, I'm creating a new element based on the array's key name.  The XML
MG> might look like this:

MG> <rootElement>
MG>   <record id="1">Value 1</record>
MG>   <record id="2">Value 2</record>
MG> </rootElement>

MG> So I'd be doing this with DOMXML in a loop:

$thisChild = $doc->>create_element($key);
MG> $thisChild = $ancestor->append_child($thisChild);

MG> Where $key is 'record' in this example, and $ancestor is 'rootElement',
MG> which is carried along in the function.

MG> The problem that when I reach the second element by the same name, and in
MG> the same node level, I'm overwriting the $thisChild object that I just
MG> created.  How can I dynamically name these objects so that I can have an
MG> indeterminate number of elements by the same name, in the same level?

What I have done is to keep an array of elements so it would work like
this

$elements = array();

//loop
if(!isset($elements[$key])){
  $elements[$key] = $doc->create_element($key);
}
$thisChild = $ancestor->append_child($elements[$key]);
//end loop

-- 
regards,
Tom


--- End Message ---
--- Begin Message ---
A couple more things and I'll stop bugging everyone.  I'm trying to get the
file name of the string.  If it includes the extension that's fine as well.
I thought the code below would do this but its not.

 $filevalue = str_replace("\\\\", "/", $filevalue);

 //get specific file name
 $parts = explode("/",$filevalue);
 $file_name = $parts[count($parts)];  //line 42

Its giving me error:
Notice: Undefined offset: 6 in
c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 42

One other thing, after the results, I get on my output screen at the top the
word "Array", yet I don't have this anywhere in my output.  Even after I
remove the above code to get rid of the error message, I get this.  Anyone
have any ideas of how I can get rid of this?

thanks



--- End Message ---
--- Begin Message ---
OK.  I think Imp the strange thing seeing things are and I don't think they
are.  Anyway, disregard the last part about the Array.  I had an echo
statement that I was using for testing buried in the code.




"Micah Montoy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> A couple more things and I'll stop bugging everyone.  I'm trying to get
the
> file name of the string.  If it includes the extension that's fine as
well.
> I thought the code below would do this but its not.
>
>  $filevalue = str_replace("\\\\", "/", $filevalue);
>
>  //get specific file name
>  $parts = explode("/",$filevalue);
>  $file_name = $parts[count($parts)];  //line 42
>
> Its giving me error:
> Notice: Undefined offset: 6 in
> c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 42
>
> One other thing, after the results, I get on my output screen at the top
the
> word "Array", yet I don't have this anywhere in my output.  Even after I
> remove the above code to get rid of the error message, I get this.  Anyone
> have any ideas of how I can get rid of this?
>
> thanks
>
>



--- End Message ---
--- Begin Message ---
>     I've just read the other thread about spammers and such.
>     Indeed, my announcement - even for a free platform - was not complying
> to the posting guidelines as it not a response to any questions asked.
> 
>     I apologize.

Where? The only guidelines that I can find for posting to this list are
at 

    http://www.php.net/mailing-lists.php

I see nothing there at all concerning announcements.

I personally appreciate brief announcements of related products,
regardless of licensing. A tag, [ANNOUNCEMENT] or [ANN], in the subject
line would be helpful, but that's the only comment I have on the subject.

If the list maintainers do have rules or guidelines about announcements,
maybe one of them would speak up now?

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp


--- End Message ---
--- Begin Message ---
Personally I like to hear about new releases of PHP related products
here too. For how often it occurs, I can't see how 1 in 80 emails a day
is really going to impact the list. Especially since 10 to 20 emails are
generated in support or indignation for such announcements :)

+1

Cheers,
Rob.

On Tue, 2003-07-08 at 20:59, Joel Rees wrote:
> >     I've just read the other thread about spammers and such.
> >     Indeed, my announcement - even for a free platform - was not complying
> > to the posting guidelines as it not a response to any questions asked.
> > 
> >     I apologize.
> 
> Where? The only guidelines that I can find for posting to this list are
> at 
> 
>     http://www.php.net/mailing-lists.php
> 
> I see nothing there at all concerning announcements.
> 
> I personally appreciate brief announcements of related products,
> regardless of licensing. A tag, [ANNOUNCEMENT] or [ANN], in the subject
> line would be helpful, but that's the only comment I have on the subject.
> 
> If the list maintainers do have rules or guidelines about announcements,
> maybe one of them would speak up now?

-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

--- End Message ---
--- Begin Message ---
Ill second that.. err third that.. I like to hear announcements also.. as
long as they are PHP based of course :)

+1 for me also.

Rick

You will never be happy if you continue to search for what happiness
consists of. You will never live if you are looking for the meaning of life.
- Albert Camus

> From: Joel Rees <[EMAIL PROTECTED]>
> Date: Wed, 09 Jul 2003 09:59:31 +0900
> To: "Alexandru COSTIN" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: [PHP] [ML] Are there any announcement rules for this list? (was Re:
> [PHP] Re: NEW SPAMMER ...)
> 
>>     I've just read the other thread about spammers and such.
>>     Indeed, my announcement - even for a free platform - was not complying
>> to the posting guidelines as it not a response to any questions asked.
>> 
>>     I apologize.
> 
> Where? The only guidelines that I can find for posting to this list are
> at 
> 
>   http://www.php.net/mailing-lists.php
> 
> I see nothing there at all concerning announcements.
> 
> I personally appreciate brief announcements of related products,
> regardless of licensing. A tag, [ANNOUNCEMENT] or [ANN], in the subject
> line would be helpful, but that's the only comment I have on the subject.
> 
> If the list maintainers do have rules or guidelines about announcements,
> maybe one of them would speak up now?
> 
> -- 
> Joel Rees, programmer, Kansai Systems Group
> Altech Corporation (Alpsgiken), Osaka, Japan
> http://www.alpsgiken.co.jp
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
hi to all.

i would like to know how to force to php to declare everything variable,
example

var $var;
$var = bla,bla..
var $var2 = array();
$var2 = bla,bla..

and issue error when a variable is instanced without declare, some idea???:



--- End Message ---
--- Begin Message ---
change your error reporting level to E_ALL
You'll then get a warning|notice (can't remember which)

-----Original Message-----
From: mack paul [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 9 July 2003 11:10 AM
To: [EMAIL PROTECTED]
Subject: [PHP] how to force variables declaration??


hi to all.

i would like to know how to force to php to declare everything variable,
example

var $var;
$var = bla,bla..
var $var2 = array();
$var2 = bla,bla..

and issue error when a variable is instanced without declare, some idea???:



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ Information from NOD32 1.452 (20030703) __________

This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com




--- End Message ---
--- Begin Message ---
Hello,


This is a reply to an e-mail that you wrote on Wed, 9 Jul 2003 at 02:10,
lines prefixed by '>' were originally written by you.
> hi to all.
> i would like to know how to force to php to declare everything
> variable,
> example
> var $var;
> $var = bla,bla..
> var $var2 = array();
> $var2 = bla,bla..
> and issue error when a variable is instanced without declare, some
> idea???:

Check out:
http://uk2.php.net/error_reporting

You want to use E_ALL to do what you described.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

--- End Message ---
--- Begin Message ---
After creating a new session with session_start() and inserting a few values
e.g $HTTP_SESSION_VARS['foo'] = 'bar'; a file /tmp/sess_{session_id} is
created.
The problem is that this file is empty! 0 bytes. no data is stored.
I'm using php 4.0.6 on linux with apache 1.3 something.

Regards
Ulf



--- End Message ---
--- Begin Message ---
I am wondering if the creators of this list could impose a rule... all
things must be PHP related... if you have an announcement and it is
related to PHP... it must be proceed in the subject line of the email
with the word "ADV" or "Annoucement" - that way if you don't want to
read it, you can delete it... or set up a rule in Outlook to delete
it??? 
 
so... just an idea
 
see ya,
joe

--- End Message ---
--- Begin Message ---
    Hi,
    I welcome your idea.

    [ANN] would be fine.

                Alexandru

-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am wondering if the creators of this list could impose a rule... all
> things must be PHP related... if you have an announcement and it is
> related to PHP... it must be proceed in the subject line of the email
> with the word "ADV" or "Annoucement" - that way if you don't want to
> read it, you can delete it... or set up a rule in Outlook to delete
> it???
>
> so... just an idea
>
> see ya,
> joe
>



--- End Message ---
--- Begin Message --- Hi Yann,

What you are trying to do is possible in PHP 4, actually:

<?php
class MyTester {
    function MyTester()
    {
        $this->var_name1 = "value1";
        $this->var_name2 = "value2";
    }
}

$test = new MyTester;
var_dump($test); // shows two variables, $var_name1 and $var_name2
?>

Here is sample code that uses __set to allow you to transparently declare an object that allows you to set database values just by setting properties.

<?php
class UsesSetForMysql {
private $_db;
private $_table;
private $_row;
private $_keyname;
function __construct($server, $user, $password, $database, $table, $keyname, $keyvalue)
{
$this->_db = mysql_connect($server, $user, $password);
$this->_keyname = $keyname;
$this->_table = $table;
if ($this->_db) {
$test = mysql_select_db($this->_db, $database);
if ($test) {
$a = mysql_query('SELECT * FROM ' . $this->_table . ' WHERE ' . $this->_keyname . ' = "' . $keyvalue . '"');
if ($a) {
$this->_row = mysql_fetch_array($a, MYSQL_ASSOC);
}
} else {
mysql_close($this->_db);
$this->_db = false;
}
}
}


    function __destruct()
    {
         if ($this->_db) {
              mysql_close($this->_db);
              $this->_db = false;
         }
    }

function __set($name, $value)
{
if (isset($this->_row) && $this->_row) {
$this->_row[$name] = $value;
$a = mysql_query('UPDATE ' . $this->_table . " SET $name = \"$value\" WHERE " . $this->_keyname . ' = "' . $this->_row[$this->_keyname] . '"');
if ($a) {
$keyvalue = $this->_row[$name];
if ($name == $this->_keyname) {
$keyvalue = $value;
}
$a = mysql_query('SELECT * FROM ' . $this->_table . ' WHERE ' . $this->_keyname . ' = "' . $keyvalue . '"');
$this->_row = mysql_fetch_array($a, MYSQL_ASSOC);
}
}
}


    function __get($name, &$value)
    {
        if (isset($this->_row) && is_array($this->_row)) {
            if (isset($this->_row[$name])) {
                $value = $this->_row[$name];
                return true;
            } else {
                return false;
            }
        }
    }
}

$table = new UsesSetForMysql('localhost', 'dummy', 'madeup', 'mytable', 'mykey', 6);
$table->FirstName = 'Greg';
$table->LastName = 'Beaver';
// etc.
?>


:)
Greg

Yann Larrivee wrote:
Hi, in the past 2 days i have been looking into php5 and it's new
features.

I am not a psecialiste of OOP (only been OOPing for 2 month)

For a moment i tought that __set would allow me not to have to define a
methode __set that would set a value to a member variable.

It seems like we have to define the class __set and __get.

for example i tought i would be able to do.

class a{
        function __construct(){
                $this->__set("var_name1","value1");
                $this->__set("var_name2","value2");
        }
}

I read these 2 tutorial
http://www.phpbuilder.com/columns/argerich20030411.php3?page=5 (the
explanation seems really bad to me and does not show any usefull way to
use these functions)

http://talks.php.net/show/php5intro/25
This one well i comes back to the same thing as if i code it my self.

So my big question is why , when , how do we use these features
(__get,__set) For a moment i tought i would save me time, but if i have to redefine
them what is the point ?


I guess i am somewhat confuse on this issue, any explanation would be
appreciated.


Thanks





--- End Message ---
--- Begin Message ---
i think you can use image counter a tag img connect to our script, 
something like this

<img src="phpcounter.php">

where the file phpcounter.php is generate counter in image form



Glory!
 
The problem I am facing is that my Index page can be an HTML page only..
not PHP. I cant use framesets, redirects etcetera. 
I want to build my own Counter using PHP & mySQL Database.. with the
"Users Online" and "Total Hits" feature. 
How can I increment the counter or affect a PHP code using HTML.. is
there someway I can achieve this? To be able to show the php counter on
my HTML page.. ?
 
Thanks,
PHPSpooky

--- End Message ---
--- Begin Message ---
Hi Mike,

        I finally got it. Thanks. All I needed to do was just define global
$page_title inside the function to denote that I wanted to use that
variable.

One other quick question, in my original code (per below) the function
create_global() was used to create_globals on demand. But this involved a
lot of jumping, from one function to another just to create the globals on
demand. Is this efficient (more?? less??) compared to just stating global
$page_title inside the function?


Please enlighten me.


-------config-----------
$page_title = "Main Page Title";
--------------------------

-------functions---------
function display_title()
{
        global $page_title;  <<---- This was what I missed
        echo $page_title;
}

function org_display_title_code()  <<--- That was what I used originally
{
        $l_main_title = create_globals( 'page_title' );

        echo 'This is (create global) title1 -> ' . $l_main_title  ;
}

function create_globals( $passed_option )
{
        if ( isset( $GLOBALS[$passed_option] ) )
        {
                return  $GLOBALS[$passed_option];
        }
}

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

------index.php----------
<?php
        display_title();
?>
------------------------


Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-----Original Message-----
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 11:34 PM
To: Ow Mun Heng
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] include/require inside of function


> -----Original Message-----
> From: Ow Mun Heng [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2003 15:53
> 
>       Here's the thing.. I declared $page_title = "My Page Title" in a
> file called config.php which is included in the index.php 
> page. when I tried
> to -> echo $page_title <- Nothing comes out. 
> 
>       If I declared it as global $page_title , then "My Page 
> Title" would
> be echoed out.

And is the assignment in the included file inside a function?  If so, the
usual rules about variables within functions apply.  If not, please post the
relevant code from both files so we can try to figure out your problem.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

--- End Message ---
--- Begin Message ---
I know that using stripslashes will remove \ using php but I'm having
trouble with posting quotation marks in a text record field. Anyone know how
I can get them to post to the database? It's basically like an email and I'd
like anything written to be able to post.

Thanks



--- End Message ---
--- Begin Message ---
wow i've had this issue aswell only yesterday , like in my search page of
the project i've just done i stored the search values of each option so that
they can return bak to the search page and edit their search entry , anyway
the fulltext search text input can contain quotes denoting exact phrase ,
this breaks in the textbox in fact even with addslashes like so \"some
text\" it will show up in the text input box like so \ , how do we get
around this ?

-----Original Message-----
From: Vernon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 12:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Text boxes posted to MySQL record that contain quotes


I know that using stripslashes will remove \ using php but I'm having
trouble with posting quotation marks in a text record field. Anyone know how
I can get them to post to the database? It's basically like an email and I'd
like anything written to be able to post.

Thanks



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
apologies i hope it didnt look like i just hijacked the thread i was just
adding to it, this is a pretty serious issue though i dont think i've ever
come across it before funny enough as most the quoted text is in the
textarea instead , the quik fix i've done is to remove the quotes altogether
but that just defeats the purpose.


--- End Message ---
--- Begin Message ---
On Wednesday, July 9, 2003, 5:50:05 AM, Vernon wrote:

V> I know that using stripslashes will remove \ using php but I'm having
V> trouble with posting quotation marks in a text record field. Anyone know how
V> I can get them to post to the database? It's basically like an email and I'd
V> like anything written to be able to post.

Try mysql_escape_string()



-- 
Regards,
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com


--- End Message ---
--- Begin Message ---
adding slashes doesnt work like i said all that will show up in the box is a
slash \

Try mysql_escape_string()



--- End Message ---
--- Begin Message ---
OK when I use the mysql_escape_string() it adds the slashes so that the
message will have \"the message\" so I've tried using the stripslashes() as
such:

    $message =
stripslashes(mysql_escape_string($HTTP_POST_VARS['message']));

which then causes the orginal problem, so it seems that I keep trying to
reverse each other.

I don't want the slashes and I need the quotes.



--- End Message ---
--- Begin Message ---
"Vernon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> OK when I use the mysql_escape_string() it adds the slashes so that the
> message will have \"the message\" so I've tried using the stripslashes()
as
> such:
>
>     $message =
> stripslashes(mysql_escape_string($HTTP_POST_VARS['message']));
>
> which then causes the orginal problem, so it seems that I keep trying to
> reverse each other.
>
> I don't want the slashes and I need the quotes.

Hi,

   this is from obscure memory, have a look at the function
get_magic_quotes_gpc. I think that the input you are getting is already
escaped.

HTH

G



--- End Message ---
--- Begin Message ---
Wow.. There's a guy named Rasmus here. Is here(or u) the same person who
wrote that book? this is way cool..

Oh.. BTW, "PHP & Mysql Web Development" is GOOD.

Also, since a lot of codes are open sourced, Read through them as well. I'm
learning through that too. (& this list)

Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia 
DID : 03-7870 5168


-----Original Message-----
From: Ralph [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 9:01 AM
To: 'Hiren Mehta'; 'PHP'
Subject: RE: [PHP] New to PHP


Here are some sites for you to get started:

http://www.zend.com/developers.php
http://www.phpcomplete.com/tutorials.php
http://www.evilwalrus.com/articles.php

And for books, here are some excellent books I've come across:

Programming PHP
By Rasmus Lerdorf

Web Application Development with PHP 4.0
by Tobias Ratschiller

Professional PHP4 Programming
By Deepak Thomas





-----Original Message-----
From: Hiren Mehta [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2003 2:28 PM
To: PHP
Subject: [PHP] New to PHP

Hi I am new to PHP and would like to learn more about it. Which would be
the best place to start with besides the manual and what would you
suggest is a pre-requiste for learning PHP.

Thanks

Regards,

Hiren



--- End Message ---
--- Begin Message ---
On Tuesday, July 8, 2003, 8:42:16 PM, Milan wrote:

MR>     is there any posibility to run PHP4 and PHP5 at one machine, with two
MR> Apache servers running at the same time.

MR> Windows 2000 SP3
MR> Apache 1.3.27/PHP 4.3.0
MR> Apache 2.0.46/PHP 5.0.0b1

Yes it is possible. If you want both of the servers to be running at
one time, then you'll have to change the Listen directive on one of
them, since both will default to port 80. So, change one to something
else, like 8080. Then access it with the port number
http://address:port

As far as the PHP install goes, you can have two PHP installs (one for
each server), you just have to make sure where the .ini files are
stored, and that the configuration directives for PHP (such as
LoadModule, etc.) point to the right direction for each server.

I also believe that the Apache Service Monitor can handle more than
one Apache install, so you'll have a convienient place to control your
servers.

-- 
Regards,
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com


--- End Message ---
--- Begin Message ---
Yes all these things I know, because already I'm running these two servers,
but both with PHP4.
But now I came accros the problem of "php4ts.dll". Because in both versiones
it has the same name. And if I have the old one my \WINNT\SYSTEM32 the
server which is running PHP5 won't start, and if i put there the newer one
the one with PHP4 won't start. That's my problem. Do you know how to solve
this?


Milan

--
----------------------------------
Milan Reznicek
Software Developer

e-mail:   [EMAIL PROTECTED]
"Burhan Khalid" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Tuesday, July 8, 2003, 8:42:16 PM, Milan wrote:
>
> MR>     is there any posibility to run PHP4 and PHP5 at one machine, with
two
> MR> Apache servers running at the same time.
>
> MR> Windows 2000 SP3
> MR> Apache 1.3.27/PHP 4.3.0
> MR> Apache 2.0.46/PHP 5.0.0b1
>
> Yes it is possible. If you want both of the servers to be running at
> one time, then you'll have to change the Listen directive on one of
> them, since both will default to port 80. So, change one to something
> else, like 8080. Then access it with the port number
> http://address:port
>
> As far as the PHP install goes, you can have two PHP installs (one for
> each server), you just have to make sure where the .ini files are
> stored, and that the configuration directives for PHP (such as
> LoadModule, etc.) point to the right direction for each server.
>
> I also believe that the Apache Service Monitor can handle more than
> one Apache install, so you'll have a convienient place to control your
> servers.
>
> --
> Regards,
> Burhan Khalid
> phplist[at]meidomus[dot]com
> http://www.meidomus.com
>



--- End Message ---
--- Begin Message ---
Ok some of you might not like this, others of you will know exactly what I
mean, but it just reminded me so much of this forum that I am sure some of
you will catch the humor in it:

http://www.mac-forums.com/forums/showpost.php?postid=5736&postcount=85

Please keep your flames directed at me instead of the mailing list so we can
keep this thread to one post.

Cheers!

"What's in a name? That which we call a rose by any other name would smell
as sweet." - Shakespeare


--- End Message ---
--- Begin Message ---
HOLY COW,

I never laughed so hard in my life, This is DEAD ON, for what happens in
this exact forum.

Damn that [EMAIL PROTECTED] is funny!!

And I've only been here for about 3 months now. I've see about every one of
those in that short time. Boy that cracks me up.

Good find Richard!!
ha...  :}

-----Original Message-----
From: Richard Baskett [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 10:42 PM
To: PHP General
Subject: [PHP] PHP forum


Ok some of you might not like this, others of you will know exactly what I
mean, but it just reminded me so much of this forum that I am sure some of
you will catch the humor in it:

http://www.mac-forums.com/forums/showpost.php?postid=5736&postcount=85

Please keep your flames directed at me instead of the mailing list so we can
keep this thread to one post.

Cheers!

"What's in a name? That which we call a rose by any other name would smell
as sweet." - Shakespeare


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
I use the dll  "php4isapi.dll" and it doesn't work, Could someone give me a
hand?

Thanks in advanced.


--- End Message ---
--- Begin Message ---
In order to use PHP on IIS6.0 you must allow IIS to use Unknown ISAPI
Extensions or Unknown CGI extensions in the Web Services section in the
IIS administration.

If you don’t allow it, IIS don’t parse any php file because it's not
allowed.


I hope this helps you...

Roberto




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Viernes, 05 de Diciembre de 2003 10:08 p.m.
To: PHP General
Subject: [PHP] How configure PHP parser 4.3.x in IIS version 6.0?

I use the dll  "php4isapi.dll" and it doesn't work, Could someone give
me a
hand?

Thanks in advanced.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Anyone have a sure way of grabbing just the file name from a string that
looks like this:

C:/Documents and Settings/Bobo the Bugbear/My Documents/My Pictures/1.gif

I would like to pull off, just the name "1.gif" or even better just "1"
without the extension.

I've been working on:

$filevalue = str_replace("\\\\", "/", $filevalue);

$parts = explode("/",$filevalue);
$file_name = $parts[count($parts)];

but with no luck.

thanks



--- End Message ---
--- Begin Message ---
try basename(). then just cut the extention with substr($string, 0, -4) (-4
if the extention is 4 characters i.e. .gif)

Regards
Ulf


"Micah Montoy" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Anyone have a sure way of grabbing just the file name from a string that
> looks like this:
>
> C:/Documents and Settings/Bobo the Bugbear/My Documents/My Pictures/1.gif
>
> I would like to pull off, just the name "1.gif" or even better just "1"
> without the extension.
>
> I've been working on:
>
> $filevalue = str_replace("\\\\", "/", $filevalue);
>
> $parts = explode("/",$filevalue);
> $file_name = $parts[count($parts)];
>
> but with no luck.
>
> thanks
>
>



--- End Message ---
--- Begin Message ---
That worked like a charm.

thanks a lot


"Ulf Sundin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> try basename(). then just cut the extention with substr($string, 0, -4)
(-4
> if the extention is 4 characters i.e. .gif)
>
> Regards
> Ulf
>
>
> "Micah Montoy" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > Anyone have a sure way of grabbing just the file name from a string that
> > looks like this:
> >
> > C:/Documents and Settings/Bobo the Bugbear/My Documents/My
Pictures/1.gif
> >
> > I would like to pull off, just the name "1.gif" or even better just "1"
> > without the extension.
> >
> > I've been working on:
> >
> > $filevalue = str_replace("\\\\", "/", $filevalue);
> >
> > $parts = explode("/",$filevalue);
> > $file_name = $parts[count($parts)];
> >
> > but with no luck.
> >
> > thanks
> >
> >
>
>



--- End Message ---
--- Begin Message ---
I'm not sure if this is the same bug that is talked about in Bug #6178:
URI Re-writing failure but there is comments of this being fixed in php
v4.0.2 and I am using php v4.3.1

I have a page that contains a form with enctype="multipart/form-data" -
used to upload an image

The form data is sent to a 2nd page that writes the image data into a
database.

In the 2nd page I also have a header function that contains an anchor
reference (#MyAnchor);

When the headers source page loads, the anchor disappears from the url.

This only happens when I post from a form that has
enctype=multipart/form-data.  I cannot be certain this is the cause but
I have some suspicions that it is.

Any ideas?



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003



--- End Message ---
--- Begin Message ---
Hi,

   How do i check with ereg() is a string is non-empty (!== '')

Thx

G



--- End Message ---
--- Begin Message ---
ereg(".+")

--

- Eddy Wong
__________________________
inframatrix internet solutions
http://www.inframatrix.com/


       ¥¿¤KEddy
Regular Octa-Eddy
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@¡½¢ª¢©
[EMAIL PROTECTED]@[EMAIL PROTECTED]@¡½ É\¿ß¡G [EMAIL PROTECTED]
[EMAIL PROTECTED]@¡½ É\¨¦¡G news://news.fixip.net/chat.ed
[EMAIL PROTECTED]@[EMAIL PROTECTED]@¡½ É\®Þ¤Æ¡G news://news.fixip.net/
[EMAIL PROTECTED]@¡½¢¨¢«
[EMAIL PROTECTED]@

"Gamin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
>    How do i check with ereg() is a string is non-empty (!== '')
>
> Thx
>
> G
>
>



--- End Message ---
--- Begin Message ---
Is there any way to jump out of PHP script but continue loading the HTML on
the rest of page?

For instance I have this conditional and if its true, I want to stop running
the rest of the script and I want the rest of the page to continue loading
that doesn't have any script.

thanks



--- End Message ---
--- Begin Message ---
are you talking about this ??

<?
if (conditionIsMet)
{

}
else
{
?>
<html>
    <head>
    </head>

    <body>
    </body>
</html>
<?
}
?>


"Micah Montoy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there any way to jump out of PHP script but continue loading the HTML
on
> the rest of page?
>
> For instance I have this conditional and if its true, I want to stop
running
> the rest of the script and I want the rest of the page to continue loading
> that doesn't have any script.
>
> thanks
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003



--- End Message ---
--- Begin Message ---
Nope.  What I was thinking was something like a HTML anchor.  where you can
jump to a completely different location on a page but I was thinking of a
different part in the script or all together completely out of the PHP
script.  Anyway, I made a work around.  I call a function if the condition
is not meet and I don't do a return.  It works and so far has been error
free.

thanks


"Yasha Nisanov" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> are you talking about this ??
>
> <?
> if (conditionIsMet)
> {
>
> }
> else
> {
> ?>
> <html>
>     <head>
>     </head>
>
>     <body>
>     </body>
> </html>
> <?
> }
> ?>
>
>
> "Micah Montoy" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Is there any way to jump out of PHP script but continue loading the HTML
> on
> > the rest of page?
> >
> > For instance I have this conditional and if its true, I want to stop
> running
> > the rest of the script and I want the rest of the page to continue
loading
> > that doesn't have any script.
> >
> > thanks
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003
>
>



--- End Message ---
--- Begin Message ---
Paying attention to this line:
> Also if I use !isset it returns true with a null value for $theme

Well this is clear in the manual:
isset() will return FALSE if testing a variable that has been set to NULL
So !isset($a_Null) = !FALSE = TRUE

>From PHP Manual
=============
$var = 0;

if (empty($var)) {  // evaluates true
    echo '$var is either 0 or not set at all';
}

if (!isset($var)) { // evaluates false
    echo '$var is not set at all';
}

Read manual: empty() and isset()



--- End Message ---
--- Begin Message ---
hi to all,

I want to develop a system that can be access in a different port of the web
(such as in Port 11000). But i dont know  how to do this without affecting
existing apache or other webserver installation. My idea is based on some
utilities that exists such as the  Webmin Utilities that are commonly used
to administer Unix/Linux.

Can anyone give a hint or good tutorial links for this problem?

Thanks in advance.



Mike




--- End Message ---
--- Begin Message ---
Try using sockets in php to set up the port and listen there...

--
BigDog


On Wed, 2003-07-09 at 00:22, Michael P. Carel wrote:
> hi to all,
> 
> I want to develop a system that can be access in a different port of the web
> (such as in Port 11000). But i dont know  how to do this without affecting
> existing apache or other webserver installation. My idea is based on some
> utilities that exists such as the  Webmin Utilities that are commonly used
> to administer Unix/Linux.
> 
> Can anyone give a hint or good tutorial links for this problem?
> 
> Thanks in advance.
> 
> 
> 
> Mike
> 
> 
> 


--- End Message ---
--- Begin Message ---
    Hi Jeff,
    What are you planning to do with XML?

    As for now, there are three or four main things you can do with PHP and
XML
1. create webapplication that call remote functions using SOAP (nuSoap and
PEAR SOAP and the libraries to use)
2. create websites that use XML messaging to retrieve data (non SOAP, just
pure XML calls and XML replies)
3. manipulate and generate XML files (using DOM or SAX) - use the standard
XML APIs form PHP (I recommend PHP 4.3.1)
4. use Krysalis or Popoon to publish information by separating the
application logic from the presentation layer (XML/XSL publishing)

    How do you plan to use XML with PHP? You just want to do some research
for future projects or do you have a project to be made that somehow
requires XML?

                Alexandru

-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
"Jeff Harris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Jul 8, 2003, "Alexandru COSTIN" claimed that:
>
> |    Hi,
> |    I've just read the other thread about spammers and such.
> |    Indeed, my announcement - even for a free platform - was not
complying
> |to the posting guidelines as it not a response to any questions asked.
> |
> |    I apologize.
> |
> |                Alexandru
> |
>
> I've just started poking around with XML. Does anyone know anything that I
> might use to learn more about it? Optimally, it would be available in the
> pear repository, and have plenty of documentation.
>
> Jeff
>
> -- 
> Registered Linux user #304026.
> "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
> Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089 0FED
> Responses to this message should conform to RFC 1855.
>
>



--- End Message ---
--- Begin Message ---
>  $result = mysql_query('CREATE TABLE members (userid INT(25) NOT NULL
> AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(50) NOT
> NULL, email_address VARCHAR(255) NOT NULL, username VARCHAR(30) NOT NULL,
> password VARCHAR(30) NOT NULL, activated ENUM('0','1') DEFAULT '0' NOT
NULL,
> date_joined DATETIME NULL, last_login DATETIME NULL);')or die("Create
table
> Error: ".mysql_error());
---------------------------------------------------

- First of all verify ' (single quote) or " (double quote) here... this
should solve the problem

BUT
- Another problem will crop 'coz u didnot define a key...

Read
-----
PRIMARY KEY (index_col_name,...)



--- End Message ---
--- Begin Message ---
I'm using MySQL and PHP for building a website, however now I need to create
a report with something like this:

-------------------------------------------------
{Title}
{Description}

{Zone1}
Detail Zone1.Topic1
DetailZone1.Topic2
DetailZone1.Topic3

{Zone2}
Detail Zone2.Topic1
DetailZone2.Topic2

{Zone3}
Detail Zone3.Topic1
DetailZone3.Topic2
DetailZone3.Topic3
DetailZone3.Topic4
-------------------------------------------------

I have 2 tables named Zone1 and Zone1detail where I do a join to get values
I need. How ever  don't know how to make something like this.

Can anyone help? Thanks in advance




--- End Message ---
--- Begin Message ---
Kirk,

Thanks for the input.

I've never been certain about the "register_globals" setting. From what I
read I understood it that since I use the new method and have my dev site
set to off that it wouldn't be a problem.

As it turns out my dev site has globals OFF, test site ON and target site
ON. So I'm no closer to figuring that one out.

regards,
Dave

"Kirk Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > This works fine on my development PC, (PHP v  4.3.1) and on
> > my primary test
> > site (PHP v4.2.2).
> > However when I try it on the target site (PHP v4.1.2) then I find that
> > immediately after starting the session everything works fine,
> > however when I
> > move to any other page the session information is lost and
> > I'm redirected to
> > log in again.
>
> Also check the "register_globals" setting in the various php.ini files. It
> is probably set to "off" on your dev and test sites, but may be set to
"on"
> on the target site.
>
> Kirk


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 04/07/2003



--- End Message ---
--- Begin Message ---
Hi,

I'm shocked. It seems it works! However.. My pages without forcing ISO
8559-2 don't look good. What to use instead so?

--
Best regards,
Sebastian

Tuesday, July 8, 2003, 3:55:43 PM, you wrote:
MO> [snip]
>> My <head> looks like that - nothing special..
>> 
>> <head>
>> <LINK href="/css/main.css" rel=stylesheet type=text/css>
>> <TITLE>Some title</TITLE>
>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
>> <script language="JavaScript" 
>> src="/javascripts/date_picker/date_picker.js"></script>
>> </head>
MO> [/snip]

MO> sorry list for the mess in this thread. got somewhat wrong.

MO> try to take the following line out:
MO> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
MO> (modifing to output correct type would be even better)

MO> regards
MO> mario


--- End Message ---
--- Begin Message ---
> Hi,
> 
> I'm shocked. It seems it works! However.. My pages without forcing ISO
> 8559-2 don't look good. What to use instead so?

Hi,

You could try leaving the line an and add content-encoding headers like this

<meta http-equiv="content-encoding" content="gzip">
(or an equiv. header() statement)

Haven't tried that, but i see a chance that it works properly.
Question is, if you let mod_gzip zip your pages, how to know when to send
this header-directive. I'm quite sure about that IE is up to making
troubles getting unzipped content with that header.

regards
mario


--- End Message ---
--- Begin Message --- Hi, I need to upload multiples files using php, but with the same "<input>" tag,
somebody can help my, is this feature supported by php?.


Anyboy knows how to invocate the browser windows that allow to select more than one file for upload ?

thanks a lot

_________________________________________________________________
MSN Compras: Veinte tiendas personales abiertas todo el día. http://www.msn.es/compras/



--- End Message ---
--- Begin Message ---
Hi, I need to upload multiples files using php, but with the same "<input>" tag,
somebody can help my, is this feature supported by php?.


Anyboy knows how to invocate the browser windows that allow to select more than one file for upload ?

thanks a lot

_________________________________________________________________
Melodías, logos y mil servicios para tu teléfono en MSN Móviles. http://www.msn.es/MSNMovil/



--- End Message ---
--- Begin Message ---
This is supported in the standards I think, as it says clearly in the
HTML 4.01 specification on www.w3.org:

"file select - This control type allows the user to select files so that
their contents may be submitted with a form."

Note that 'files' is plural.

However, no browser yet supports this feature. The only way to upload
multiple files in one page is to create multiple fileboxes and store the
filenames in an array.

Or you could do it like me, upload zipfiles and extract them with some
ziplibrary, like zlib.


-----Original Message-----
From: Francisco Morales
[mailto:[EMAIL PROTECTED] 
Sent: 9. júlí 2003 08:30
To: [EMAIL PROTECTED]
Subject: [PHP] Multiple upload files with php problem!!


Hi, I need to upload multiples files using php, but with the same
"<input>" 
tag,
somebody can help my, is this feature supported by php?.

Anyboy knows how to invocate the browser windows that allow to select
more 
than one file for upload ?

thanks a lot

_________________________________________________________________
Melodías, logos y mil servicios para tu teléfono en MSN Móviles.  
http://www.msn.es/MSNMovil/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
Hi there!

I'd like to ask if there is any work-around available for saving
picture(s) (BMP/JPG/PNG) in *.xls file.

I need to create (using PHP) dynamically xls file with some pictures in
it.

thanks

Jan


--- End Message ---
--- Begin Message ---
PHP with Excel??? I know it can work with CVS but not exactly with Excel
(xls) files. Why not use Access (in windows with ASP) or MySQL (in Linux
server)?
"Jan" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
>
> Hi there!
>
> I'd like to ask if there is any work-around available for saving
> picture(s) (BMP/JPG/PNG) in *.xls file.
>
> I need to create (using PHP) dynamically xls file with some pictures in
> it.
>
> thanks
>
> Jan
>



--- End Message ---
--- Begin Message ---
Hello all,

I just have a quick question, I am not sure that it is even possible but im
gonna take a whack anyways, basically what i want to know is,

can you use your windows logon as set it as a variable in php??

eg I log onto a windows machine using brenton can i use a php script to set
that as a variable, I have seen a similar type function before but i have no
idea how it works, I know windows sets the variable %username% that as a
network administrator i use in shortcuts to point to their home drive..

Hopefully i can do this :P

Cheers in advance


--- End Message ---

Reply via email to