[PHP] Re: Browser Cache and PHP Namespace

2007-05-18 Thread M.Sokolewicz
Sancar Saran wrote: Greetings, I had some problems with broser caching behaviors and php name space collision. I do lot of googling and try to figure what happened and I failed to figure. So I need help, Here Details 1-) Browser Cache Beahviors You know the back button problem. I search

[PHP] Re: showing source

2007-05-18 Thread M.Sokolewicz
Why don't you use: highlight_file(__FILE__) ? - tul James Lockie wrote: This almost works but all my and are replaced with . // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for

Re: [PHP] using preg_match

2007-05-16 Thread M.Sokolewicz
Ed Curtis wrote: Christian Haensel wrote: Hi Ed, did you try the backslash as escape character? ? $path = testing/realtors/userdata/; if(preg_match(/\/realtors/, $path)) { echo 'Success'; } ? That's what did it. I was thinking the \ was the escape for the command but wanted to make sure.

[PHP] Re: self:: vs this

2007-05-11 Thread M.Sokolewicz
Mariano Guadagnini wrote: Hy people, I have an existential doubt regarding php classes. I have been a php programmer for quite a long time, but never could figure out the clear difference between using this- or self:: when calling member functions, wether they are private or public. I used

[PHP] Re: Mailbox @php.net

2007-05-05 Thread M.Sokolewicz
Get a php.net CVS account and you get an @php.net email adress with it. It's an extra for the work you do, not just to be able to show off your new email. - tul Shadow wrote: Hi, All. Does anybody know how someone can get an email @php.net? Thanks. -

Re: [PHP] define() an array?

2007-04-27 Thread M.Sokolewicz
Chris wrote: Tijnema ! wrote: On 4/20/07, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, April 20, 2007 4:46 am, [EMAIL PROTECTED] wrote: I thought I could define() and array. However, when I do this: Nope. :-( Has to be string or int or boolean or float or other scalar type.

Re: [PHP] PHP editor

2007-04-13 Thread M.Sokolewicz
Philip Thompson wrote: On Apr 13, 2007, at 10:26 AM, Jay Blanchard wrote: [snip] Just showing my ignorance, probably, but what exactly is meant by a PHP editor? Does it mean an editor for editing PHP scripts, or an editor written in PHP? [/snip] Something to edit PHP with...unless you're

Re: [PHP] Array remove function?

2007-04-10 Thread M.Sokolewicz
Lori Lay wrote: Tijnema ! wrote: On 4/10/07, Daevid Vincent [EMAIL PROTECTED] wrote: OMG. Now that is the best idea. How simple. Guess I learned something new today too! :) -Original Message- From: Lori Lay [mailto:[EMAIL PROTECTED] Use array_search() and unset()? Interesting,

Re: [PHP] Troubles from the newb again

2007-03-10 Thread M.Sokolewicz
Jeff Taylor wrote: Yeah I have, but what I dont understand is that the value of $name is an object, and was accepted in the original array as the index: the original array was: $me = new Toon(,xxx,xxx,,xxx,etc,etc,etc) $him = new Toon(xxx,xx,x,etc,etc,etc,etc)

Re: [PHP] Variable variables and references

2007-03-10 Thread M.Sokolewicz
I'd agree with Tijnema! here, variable variables aren't really of any use here. However, a classic snippet of code is where one emulates register_globals functionality in a non-register_globals environment (not a good idea to do this btw, unless you know what you're doing and don't have any

Re: [PHP] Eregi error

2007-03-01 Thread M.Sokolewicz
I agree with the first part, that it is in many cases better to use the Perl Compatible Regular Expressions (PCRE, preg_*) than the POSIX compatible ones (ereg[i]_*). However, I don't quite get what you mean by extension is useless ? What extension...?? and why would it be useless? (useless in

Re: [PHP] Catch STDERR

2007-02-19 Thread M.Sokolewicz
you could instead use the proc_* functions to do this. However, seen as those are pretty complicated and were not available in most php versions ran by most hosts, a lot of people had to come up with other ways around it. The most used way is indeed what you described. A simple: $t =

Re: [PHP] What is $this-

2007-02-19 Thread M.Sokolewicz
Ok, I'm pretty sure you have a point there, but I can't really see it to be honest. First of all, let's start out with the usual: RTFM! This page: http://www.php.net/oop should explain basic class/object/method/member terminology required to understand what's going on here. In short you

[PHP] Re: php from address

2007-01-25 Thread M.Sokolewicz
Chantal Rosmuller wrote: Hi everyone, In November I sent a mail to this list asking how to get the mail From header right, I solved that but I still have a problem. The solution was using the -f option like this: $frommail = [EMAIL PROTECTED]; mail($to, $subject, $message,

[PHP] Re: question about str_replace function

2007-01-08 Thread M.Sokolewicz
change it to ?php $string=avenue 1, ave 1; $words=str_replace (ave ,avenue , $string); echo $words; ? Kencana wrote: Hi all, I got a doubt about the str_replace function. ?php $string=avenue 1, ave 1; $words=str_replace (ave,avenue, $string); echo $words; ? the php code above will return

[PHP] Re: convert postgres date to PHP

2006-11-11 Thread M.Sokolewicz
well, I could say RTFM, but I'll help you this time with a few links: 1. date() http://www.php.net/manual/en/function.date.php 2. strtotime() http://www.php.net/manual/en/function.strtotime.php - tul P.S. RTFM! Alain Roger wrote: Hi, in my database PosgreSQL i have stored some date in the

[PHP] Re: convert postgres date to PHP

2006-11-11 Thread M.Sokolewicz
wrote: Sorry to tell you that but that's why i ask here this question, because i get everytime 01.01.1970.. RTFM i did ! On 11/11/06, M.Sokolewicz [EMAIL PROTECTED] wrote: well, I could say RTFM, but I'll help you this time with a few links: 1. date() http://www.php.net/manual/en/function.date.php 2

Re: [PHP] PHP Source File Encoding

2006-11-11 Thread M.Sokolewicz
UTF-8 works as long as you don't include a BOM (ByteOrderMark). - tul Google Kreme wrote: On 11 Nov 2006, at 08:45 , C Drozdowski wrote: Gotta a question whose answer should be really obvious to me but, for some reason, is just eluding me. Which encodings can PHP handle for source files?

Re: [PHP] Time-Zone juggling

2006-11-09 Thread M.Sokolewicz
David Giragosian wrote: On 11/8/06, Travis Doherty [EMAIL PROTECTED] wrote: David Giragosian wrote: Does Daylight Savings alter Zulu time? (I'm guessing yes). How did the military deal with that? I use a date-time field as a primary key in db tables that get an insert a minute. I had

[PHP] Re: As use PHP_MAPscript??????

2006-11-02 Thread M.Sokolewicz
Eduardo Arévalo wrote: I have installed a Mapserver ms4w v 2,0 and PHP 5.1.4 I want to use I modulate MAPSCRIPT. Questions as I verify that this installed this I modulate as I install it As it use (some manual). thanks so what is it you want exactly...?? because to be honest, I have

Re: [PHP] why so slow?

2006-11-01 Thread M.Sokolewicz
No you have not, otherwise we would not be seeing: !-- * start header -- !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head when we SHOULD be seeing !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

Re: [PHP] php.ini ini_set

2006-10-31 Thread M.Sokolewicz
Why can't you just add a From: Registrar [EMAIL PROTECTED] header? =/ - tul Chris wrote: Beauford wrote: That doesn't work. Here is what I have. mail($email,$subject,$body,$from); Which is (senders address, the subject, the body of the message, and the from address) The from address is

[PHP] Re: A general UL script

2006-10-28 Thread M.Sokolewicz
Børge Holen wrote: When I use a normal single file upload form; both of these statements will continue wether my form is empty or not, why? if(!empty($_FILES)){ do som checking if its a jpg. if not exit; if(isset($_FILES)){ because it IS set and NOT empty.

Re: [PHP] foreach on a 3d array

2006-10-25 Thread M.Sokolewicz
M.Sokolewicz wrote: Dotan Cohen wrote: On 24/10/06, Chris Boget [EMAIL PROTECTED] wrote: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE

Re: [PHP] foreach on a 3d array

2006-10-24 Thread M.Sokolewicz
Dotan Cohen wrote: On 24/10/06, Chris Boget [EMAIL PROTECTED] wrote: $languages = array( af = array(Afrikaans, Afrikaans, South Africa), sq = array(Albanian, Shqipe, Albania)); foreach ($languages as $language){ if ( strstr( $_HTTP_ACCEPT_LANGUAGE, $language) ) {

[PHP] Re: postback for php

2006-10-18 Thread M.Sokolewicz
Ross wrote: Looked on google and not found a satisfactory answer. Doies anyone have a funtion to do this? R. please explain, in details, what it is you're looking for. postback for php - a function to do this doesn't mean squat to most people. Please EXPLAIN. - tul -- PHP General

[PHP] Re: Windows ENV['_'] equivalent

2006-10-13 Thread M.Sokolewicz
you've considered the fact that you might be running php as a module via ie. apache, thus not using a php.exe at all? (you'd be using a php4ts.lib/php5ts.lib instead) - tul Richard Lynch wrote: So, I have this automated testing script I wrote, and I want to make it work on more than just my

[PHP] Re: class usage

2006-09-29 Thread M.Sokolewicz
Well, you could say that there is no difference really. Classes are mainly used as collections; They're a collection of functions (methods) sharing a common goal/dataset/whatever. One real world example is with database abstraction layers. Say you have a script like: ?php // [... crap ...]