if (cond || cond2)
OR
if (cond OR cond2)
What do you use, and why?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> if (cond || cond2)
>
> OR
>
> if (cond OR cond2)
>
>
> What do you use, and why?
>
> --
|| coz its easier to type ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Sunday 25 April 2004 12:14 am, Aidan Lister wrote:
> if (cond || cond2)
>
> OR
>
> if (cond OR cond2)
>
>
> What do you use, and why?
Doesn't matter- personal preference.
--
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en
--
"There is a certain right by which we may deprive a man o
On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
> Hi all,
>
> ok, this may be a dumb question, but I have a page that has server side
> includes that include a php script like this :
>
>
>
> works fine, except the script doesn't appear to receive any of the query
> string information if that
Aidan Lister schrieb:
if (cond || cond2)
OR
if (cond OR cond2)
What do you use, and why?
It doesn't matter except you combine it because || has a higher priority
as OR.
Rainer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tim Traver wrote:
Hi all,
ok, this may be a dumb question, but I have a page that has server side
includes that include a php script like this :
Please send a new message if you have a new question, and do not reply
to a thread and change the subject. It breaks the conversation flow.
Where is
Patagonia Hosting Development Group wrote:
That may be the exact problem. I was not figuring that one out. Thi is my
fopen and XML parser code:
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "charac
Todd Cary wrote:
My client is using GroupWise to relay *without* having relay turned on
and it needs/uses an authenication that is different from the regular
SMTP. Here is a trace of a message that went through:
[ snipped POP before SMTP authentication ]
Does anyone know of a class that can p
Hi all,
We just installed PHP 4.3.6 on FreeBSD 5.2.1 on some SMP machines and we are
experiencing some weird problems.
The PHP processes are running as FastCGI under Zeus with these compile
options:
./configure --with-curl \
--enable-sockets \
--enable-dbx \
--with-jpeg-dir \
--with-jpeg \
--pr
I used to have the "r" alone but I thought on trying... and nothing...
"Burhan Khalid" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Patagonia Hosting Development Group wrote:
>
> > That may be the exact problem. I was not figuring that one out. Thi is
my
> > fopen and XML pa
According to historical records, on Sun, 25 Apr 2004 17:14:13 +1000 Aidan
Lister wrote about "[PHP] OR":
>if (cond || cond2)
>
>OR
>
>if (cond OR cond2)
>
>
>What do you use, and why?
I always use ||
basically because to me it's easier to read in more complex statements ...
like this:
if ((
hi...
i have to make an adult content censoring system so people cant post "bad"
words on any public viewable posts. i know preg_replace and possibaly
preg_match would be a huge help but im wondering how i would put all the bad
words in a file (textfile) 1 word on a line and have it look through t
Hello Andy,
Sunday, April 25, 2004, 3:22:29 PM, you wrote:
AB> i have to make an adult content censoring system so people cant post "bad"
AB> words on any public viewable posts. i know preg_replace and possibaly
AB> preg_match would be a huge help but im wondering how i would put all the bad
AB>
I think you want to remove the single quotes around the field names.
SELECT * FROM my_table WHERE (field_1 LIKE '%$keyword%' OR
field_2 LIKE '%$keyword%' OR field_3 LIKE '%$keyword%') AND
status = 'active';
>>I STFW and RTFM and I still can't figure out why this returns a 1064
>>parse error:
The parenthesis are OK. The query might take a long time to run with 3 LIKE
statements.
>>Backticks, single quotes, or nothing at all makes no difference. I
>>believe the parsing error is due to my parentheses or AND/OR structure.
>>Any thoughts on that?
>>
>>
>>
>>On Apr 23, 2004, at 8:32 A
I am wondering if it is possible to let two or more scripts share a common
session id ?
I am guessing not, but would like to be proved wrong.
This is the situation cut down about as small as I could make it.
Five files: index.php, login-form.inc, frames.inc, left.php, main.php
index.php
-
--
Richard Davey wrote:
> and that's it - I pass any string I need to this whenever someone
> posts a message, subject, etc etc and it hasn't failed me yet :)
> (unless the bad word isn't in your list of course!)
To guard against 'lame' impressions of words to be filtered, you might also
check all c
* Thus wrote Richard Davey ([EMAIL PROTECTED]):
> Hello Andy,
>
> Sunday, April 25, 2004, 3:22:29 PM, you wrote:
>
> AB> i have to make an adult content censoring system so people cant post "bad"
> AB> words on any public viewable posts. i know preg_replace and possibaly
> AB> preg_match would be
Richard A. DeVenezia wrote:
I am wondering if it is possible to let two or more scripts share a common
session id ?
I am guessing not, but would like to be proved wrong.
I might get you wrong, but unless you take some precausions all scripts
on a single domain share common session id.
--
PHP Gene
* Thus wrote Lasse Laursen ([EMAIL PROTECTED]):
> Hi all,
>
> We just installed PHP 4.3.6 on FreeBSD 5.2.1 on some SMP machines and we are
> experiencing some weird problems.
>
>...
>
> The database backend is MySQL 4.0.18 and is run on a seperate dedicated
> server.
What mysqlclient is php lin
Jeff McKeon wrote:
No... PHP and JavaScript are executing at different time and
at different place. Besides, they are executed by different programs.
Are you trying to measure execution time of a query??
Look at:
http://www.php.net/microtime
No, I'm trying to get a little animation on the lef
Hello Curt,
Sunday, April 25, 2004, 4:28:37 PM, you wrote:
CZ> Also instead of str_replace scanning the whole string 5 time to
CZ> replace the 5 items, its only scanned once, replacing up to five
CZ> things.
My method *did* only scan the string once and str_replace is
definitely faster than pre
* Thus wrote Richard Davey ([EMAIL PROTECTED]):
> Hello Curt,
>
> Sunday, April 25, 2004, 4:28:37 PM, you wrote:
>
> CZ> Also instead of str_replace scanning the whole string 5 time to
> CZ> replace the 5 items, its only scanned once, replacing up to five
> CZ> things.
>
> My method *did* only
BEEP wrong :)
http://www.php.net/manual/en/language.operators.php#language.operators.precedence
therefore:
$a AND $b OR $c AND $d
is not equal
$a AND $b || $c AND $d
but is equal to
$a && $b || $c && $d
-- red
Evan Nemerson wrote:
On Sunday 25 April 2004 12:14 am, Aidan Lister wrote:
if (
Yes, I mean that php gets the server information for the request, but it
doesn't get the QUERY_STRING variable. But it does get the
UNESCAPED_QUERY_STRING variable...wierd, huh ?
It might be that apache isn't sending that variable to php from an included
file...not sure...
That's why I'm askin
This is possible without problem. Just start your session in every script
and forward the session id from your frameset (which is probably the first
page to be called by the user) to each frame:
frames.inc
--
?>
Make sure to put the session start code at the top of EVERY page.
php-general Digest 25 Apr 2004 17:27:52 - Issue 2726
Topics (messages 184546 through 184574):
SSI and query string variables to PHP
184546 by: Tim Traver
184547 by: Tim Traver
184552 by: Evan Nemerson
184554 by: Burhan Khalid
184573 by: Tim Traver
Re:
On Sunday 25 April 2004 09:56 am, Tim Traver wrote:
> Yes, I mean that php gets the server information for the request, but it
> doesn't get the QUERY_STRING variable. But it does get the
> UNESCAPED_QUERY_STRING variable...wierd, huh ?
Yeah, especially since I've never heard of UNESCAPED_QUERY_ST
Hi Curt,
Thanks for your email - please find answers below:
Regards
--
Lasse Laursen · VP, Hosting Technology · NetGroup A/S
St. Kongensgade 40H · DK-1264 Copenhagen K, Denmark
Phone: +45 3370 1526 · Fax: +45 3313 0066
- Don't be fooled by cheap finnish imitations - BSD is the One True Code
I am looking to port some java code to PHP. I am looking at interfaces in
PHP 5 and wondering if they support 'interface . extends .'. For example I
have interface C and it extends Interface A and B..
Thanks,
Brandon
Hi
Am So, 2004-04-25 um 16.00 schrieb -{ Rene Brehmer }-:
> According to historical records, on Sun, 25 Apr 2004 17:14:13 +1000 Aidan
> Lister wrote about "[PHP] OR":
[...]
> || && |! &!
> ^ being OR, AND, NOR, and NAND (believe NOR is actually called XOR, can't
> remember ...)
Just to help yo
Depends on how badly the person wants to use "adult language"every "bad
words filter" can be bypassed unless you are the filter.
E.g: you screen the comments before allowing or disallowing it...
My $0.2
Cheers,
-Ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: h
Using mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people. This seems to be a result of a socket
being opened for each send. Is there a better way to approach this
situation via php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi, all --
I must be having a brain fart as well as going blind because I can't find
in the manual how to do this.
Given a string like #AABBCC or #112233 how do I get the
2nd-3rd
4th-5th
6th-7th
position substrings so I can break out the red, green, and blue values?
All of the regular exp
Hello,
On 04/25/2004 04:18 PM, Josh Klobe wrote:
Using mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people. This seems to be a result of a socket
being opened for each send. Is there a better way to approach this
situation via php?
Under Unix/Linux,
$color = '#aabbcc';
if (strlen($color) == 7) {
echo ' r: ' . substr($color, 1, 2);
echo ' g: ' . substr($color, 3, 2);
echo ' b: ' . substr($color, 5, 2);
} elseif (strlen($color) == 4) {
echo ' r: ' . str_repeat(substr($color, 1, 1), 2);
echo ' g: ' . str_repeat(substr($color, 2, 1
Richard, et al --
...and then Richard Harb said...
%
% $color = '#aabbcc';
%
% if (strlen($color) == 7) {
%echo ' r: ' . substr($color, 1, 2);
[snip]
D'oh! I knew it should be substr but I could never find it! I was up to
page 1098 or such and muddling through all of the PCRE doc when I g
Manuel Lemos wrote:
Hello,
On 04/25/2004 04:18 PM, Josh Klobe wrote:
Using mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people. This seems to be a result of a socket
being opened for each send. Is there a better way to approach this
situation via ph
rb is correct, b should be used to ensure portability between operating
systems with different line endings.
Quoted from http://us2.php.net/fopen
"For portability, it is strongly recommended that you always use the 'b'
flag when opening files with fopen()"
Jason
-Original Message-
From
Hmmm after doing more research on it, it appears that this server
variable only appears in SSI documents.
And I didn't quote the variable correctly, its "QUERY_STRING_UNESCAPED"
I guess that SSI does not send through the querystring to the included script.
I might have to just use the QUERY
On Sunday 25 April 2004 01:00 pm, David T-G wrote:
> Hi, all --
>
> I must be having a brain fart as well as going blind because I can't find
> in the manual how to do this.
>
> Given a string like #AABBCC or #112233 how do I get the
>
> 2nd-3rd
> 4th-5th
> 6th-7th
>
> position substrings so
Hello,
On 04/25/2004 05:43 PM, Travis Low wrote:
Using mail($to, $subject, $content, $headers) takes way too long when
attempting to mail to 30k people. This seems to be a result of a socket
being opened for each send. Is there a better way to approach this
situation via php?
Under Unix/Linux
Take a look at the Mail Queue class from PEAR, it enables you to put mail in
the Queue instead of real time delivery.
http://pear.php.net/packages.php?catpid=14&catname=Mail
Jason
-Original Message-
From: Travis Low [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 25, 2004 2:43 PM
To: [EM
Hello,
On 04/25/2004 06:03 PM, Jason Sheets wrote:
Take a look at the Mail Queue class from PEAR, it enables you to put mail in
the Queue instead of real time delivery.
http://pear.php.net/packages.php?catpid=14&catname=Mail
This is a bit of an overkill as it attempts to provide an inefficient
so
44 matches
Mail list logo