On 16 April 2007 16:18, Tijnema ! wrote:
> On 4/16/07, Ford, Mike <[EMAIL PROTECTED]> wrote:
> > On 14 April 2007 13:16, Afan Pasalic wrote:
> >
> > > Tijnema ! wrote:
> > > > On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrot
27;d never do this in any form -- if I do it at all, I extract
specific indices of the array with code like:
foreach (array('name', 'address', 'email', 'setting1', 'setting2') as $key):
$GLOBALS[$key] = $array[$key];
endforeach;
... making
rtant that people don't change anything, then go with GET.
barophobia wrote:
My Peeps,
I only know of one reason to submit a form as POST and that is because
you can submit more data in one shot.
What other reasons are there?
Chris.
--
Mike Shanley
~you are almost there~
"A n
ng printed all
over, but nothin! Oy. I guess the people will have to live without
bookmarks!... Or maybe just me, since it worked for you.
;-)
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ay_values(array_unique(explode('/',$PHP_SELF)));
unset($CALL[0],$CALL[(array_search('index.php',$CALL))]);
$CALL = array_values($CALL);
and all that does is hand me the info to call my pages...
Thanks
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.p
r change your email address.
>
> As us USA types are told, we all have to adapt to global conventions.
> :-)
... which presumably explains why the (US-owned) company my wife works for has
email addresses in the form [EMAIL PROTECTED] Would you be equally confused by
these?
Cheer
in c:\www-lco\scripts_etc\lco\php\test.php on
line 18
with @ --
Also:
\n";
echo "with @ --", @($a/0), "\n";
?>
Result:
no @ --
Warning: Division by zero in c:\www-lco\scripts_etc\lco\php\test.php on line
19
with @ --
Not that I'm necessar
PHP runs as CGI, so it shouldn't cause any problem other then possibly with
my script-- or am I missing something?
On 3/19/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Sun, March 18, 2007 9:28 pm, Mike Payson wrote:
> I'm trying to install the extension runkit on my shar
Never mind... should be temp_dir, not temp-dir... to make you all read that
long message for such a silly mistake!
On 3/18/07, Mike Payson <[EMAIL PROTECTED]> wrote:
I'm trying to install the extension runkit on my shared server. I
successfully installed a local copy of P
I'm trying to install the extension runkit on my shared server. I
successfully installed a local copy of PEAR via the instructions at
http://pear.php.net/manual/en/installation.shared.php. Here is the resulting
configuration:
Configuration (channel pear.php.net):
=
uld be
generalized. In fact, I'd completely forgotten that I suggested as much at the
end of the bug report -- but this hasn't been taken up, so maybe a bunch of you
want to re-activate the bug report and support my suggestion??
Cheers!
Mike
--
't. :-)
>
> You *think* you want to write that function, but this is one of those
> things that is *way* more complicated than it seems to the beginner.
>
> How about:
>
> O'Brian
> McCormick
> Rodham-Clinton
> von
ings?
>
> What is that supposed to even mean?...
>
> Type-cast them to numbers if you want to use 'and'
Why in the world would you use 'and' on two numbers?
What is that supposed to even mean?...
Type-cast them to bool if you want to use 'and'
...
"1", the
> FALSE value is represented as "" (empty string). This way
> you can convert back and forth between boolean and string
> values.
And I can testify from personal experience that this has been true since the
very early days of 4.0.x (in f
'".$firstname."',
'".$lastname."',
'".$birthdate."',
'".$verifythis."');";
mysql_query($q);
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
y slower and the table is expanded. I'll give it a try
though.
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e the problem is
here.
I'm just wondering if there's a way to combine calls to 5 different
tables down to 1 query, as though all the info needs to be organized
separately, it's going to the same place.
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
(~~)
{database call here} loop. Any ideas?
Lastly, I'd like to be able to call data from different (not joined)
tables in a database. Aside from not being able to find info to do it,
I'm wondering if any such solution would be worth it. What do you think?
Thanks!
--
Mike Shan
ks ok, but how do I get the value?
>
> all I get back is 'a' or 'b', not 'apple' or 'banana'...
Please show a little more code, as it looks to me as though this should work
how you think it should.
Specifically: how do we know wha
';
?>
--
Mike Shanley
~you are almost there~
"A new eye opens on March 5." -Omniversalism.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
since my posting of the code.)
Thanks to everyone!
[EMAIL PROTECTED] wrote:
Different strokes for different folks...
Might I toss a new recommendation into the mix?
SELECT text FROM fortunes ORDER BY RAND() LIMIT 1;
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://w
This was the problem. Thanks very much!
Brad Fuller wrote:
2) INDEX is a mysql keyword. Try putting backticks around it.
"... WHERE `index` = $randi"
--
Mike Shanley
~you are almost there~
"A new eye opens on March 5." -Omniversalism.com
--
PHP Genera
Without the single-quotes, I still get nothing returned.
Bruce Cowin wrote:
Are you getting an error or just nothing returned? The first thing I'd check
is if index is a numeric field and if it is, remove the single quotes from
around $randi in the where clause.
Regards,
Bruce
es WHERE index = '$randi'";
$choose = mysql_query($q);
$chosen1 = mysql_fetch_array($choose);
// Ready to ship...
$fortune = '"' . $chosen1[0] .
'"-Omniversalism.com';
mysql_close();
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks very much Pete! Sound advice!
Peter Lauri wrote:
Hi,
No matter the size of a project using includes and config files are always a
good way to go.
--
Mike Shanley
~you are almost there~
"A new eye opens on March 5." -Omniversalism.com
--
PHP General Mailing
things, but I was just wondering what you all thought.
BTW- It's my first time here! Hello world!
--
Mike Shanley
~you are almost there~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
it is not programming time
in itself. Googling the topic has been useless.
Any advice?
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
total tosh! array_multisort() won't handle this one -- usort() is
correct. The only function needed is a (one-liner!) custom comparison to
compare individual [1] elements -- usort() takes care of all the rest:
function compare_1($a, $b) { return strcmp($a[1], $b[1]); }
usort($array,
applied?
Thanks.
Mike
s it create a sub-array of $_POST?
And is it documented somewhere in the manual?
Greets
Zoltán Németh
On sze, 2007-01-17 at 10:54 -0500, Mike Smith wrote:
>
>
> *note the [].
>
> --
> Mike
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
*note the [].
--
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> After the last entry in the LoadModule section:
>
> LoadModule php5_module "c:/php5/php5apache.dll"
My memory may be failing here, but I believe that's the .dll for Apache 1. For
Apache 2.
with my email server or my php(www)
server?
If it is a php problem, then how do I fix it?
Other than using /notls or /no-validate
--
Mike B^)>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e for this laying around
that I can see (and modify)?
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I want to be able to use the exec() function on my site, but do not want to
allow all the other users that same ability.
IS there a safe and secure way to limit the use of that function to a single
virtualhost...maybe even a single page or directory?
--
Mike B^)>
--
PHP General Mail
Note also the doubled backslash, since you need to pass a single backslash
through to escape the / for preg_match. As an alternative, I would strongly
advise using a different delimiter, so that no escaping is needed; for instance:
preg_match("# dir=ltr>(.+?)#", $orig, $mat
On 12/8/06, mike xu <[EMAIL PROTECTED]> wrote:
Hi Ryan,
I just did another test, if I start the httpd by root user manually (the
httpd daemon program still owns apache user by the result of `ps -aux`), the
php script works fine. So, it seems the httpd start script
(/etc/rc.d/init.d
problem...
I'll continue checking it ...
Thanks,
Mike
On 12/8/06, Ryan Creaser <[EMAIL PROTECTED]> wrote:
mike xu wrote:
> Thanks a lot forr your reply.
>
> Here is the error msg:
> *Warning*: fopen(/dev/pmsg)
> [function.fopen<http://localhost/Source/test/function.fop
ove pmsg to /tmp/ directory and change its
own to appache...
*
On 12/8/06, Ryan Creaser <[EMAIL PROTECTED]> wrote:
mike xu wrote:
> Hi, I have problem of open named pipe file in linux.
>
> Here is my sample code:
>
> $fifo_file = "/dev/pmsg";
> @ $fp = fopen($fif
Environment info: php-5.1.2-5, httpd-2.2.0-5.1.2, OS: Redhat FC5
Thanks in advance,
Mike
gt; > are not opposites in the same way that == and != are.
False, false, false, and a thousand times false. If $a===$b returns TRUE, then
$a!==$b returns FALSE; and if $a===$b returns FALSE, then $a!==$b returns TRUE.
I don't know how much more opposite you can get.
Cheers!
Mike
-
urns the complementary FALSE
Immediately, then, you can see that we have two values that are both !==FALSE,
and yet neither of them is the value TRUE.
I'm afraid I've gone on at some length here, but I felt throughout this thread
values instead. These constants can be used in php.ini |
+-----+
Cheers!
Mike
-
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolit
he $row['title'] variable is the problem.
> >
> > Drop the quotes when you are inside a quoted string.
> > $mail_body .= "... Title: $row[title] ";
>
> does that actually work?
Not only works, but fully documented
= $writeFoo;
>$writeFoo2 ();
>$this->writeFoo = $writeFoo;
>return call_user_func($this->writeFoo, 'arg1, arg2'); }
You could also try {$this->writeFoo}() -- not certain about this (OOP is not my
big thing), but worth a try.
Cheers!
Mike
-
$_REQUEST - The *three* above merged.
I'm not sure whether $_REQUEST is affected by the variables_order configuration
setting, but this could potentially affect both presence and precedence of the
GPC variables in $_REQUEST.
Cheers!
Mike
-
is more explicit! Yes.
Also, shouldn't it be possible to check for and, based on the '='
there, pop out of the parser if it comes across ?
Cheers,
Mike
> As was said before, the major reasons for not using short tags are:
>
> 1) Not everyone has access to the ini file, a
way, but I don't understand why it's disabled?
What's gained by writing over
Thanks in advance.
Cheers,
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
bits) hash, encoded 4, 5 or 6 bits per character. There are 6
possible combinations of these settings, giving 5 possible session id lengths
of 40, 32, 27, 26 and 22 characters.
Cheers!
Mike
-----
Mike Ford, Electronic Information Serv
one button on-off switch.
>
>
>
> $session_switch = isset($_GET['session_switch']) ?
> $_GET['session_switch']
> > 0;
> if ($session_switch==1) {
> echo "on";
> >
> //do something here
>
> }
> else {
>
without them, it's the equivalent of:
if ( $result = (do_something('hello') !== false) )
which will only assign TRUE or FALSE to $result.
Cheers!
Mike
-
Mike Ford, Electronic Information Services Adviser,
Le
GREATLY appreciated!
TIA
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t's where capturing expressions and backreferences come in handy:
preg_replace ("/.*(.*).*/", "$1", $htmlPage);
(add qualifiers and other options to taste, as before!)
Cheers!
Mike
-
Mike Ford, El
ing, use the s modifier to change this:
preg_replace("//s", "", $htmlPage);
You also don't need the parentheses -- these will capture the entire matched
expression for use in backreferences, but as you don't have any it's then
immediately thrown away
ame from an Info Call\r\rDate: 20060720\rName: \rReferral: Home
Buyers Seminar\rTelephone: 1-123-4567\rLoan Officer: Dave Boxer\r
How can I get the CR that I want so each item is on a separate line?
TIA
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You unlink it.
Mike
Message Received: Jul 17 2006, 04:26 PM
From: "Benjamin Adams" <[EMAIL PROTECTED]>
To: "php php"
Cc:
Subject: [PHP] Delete an upload
I created a form where users can upload.
I'm working
t indicate what's in each
element, to avoid having to remember somehow which numeric index corresponds to
which attribute; so:
$_SESSION['item'][$count]['phone'] = $_POST['phone'];
$_SESSION['item
esn't exist == false
>
> But what happens is that PHP actually is writing a new sess_1234
> WITH ALL THE SHIT IT HAD IN RAM
>
> *sigh*
>
> Why is this so complicated for anyone to understand?
Cheers!
Mike
-
mes up for "php5". So
> > > where is it getting this entry?
Where, exactly, does phpinfo say PHP is looking for your php.ini file? Becasue
this include_path value looks like it might be the default you get when PHP
can't find a php.ini at all.
Cheers!
Mike
---
lemented using the switch(TRUE) technique
(and I've used that elsewhere), but in a case like this instance I prefer the
if/elseif construct.
Cheers!
Mike
-
Mike Ford, Electronic Information Services Adviser,
Learning S
mplex to me -- there are 3 identical occurrences of
some items.
When constructing an if() sequence, I think it's always important to isolate
the parts that genuinely differ, so my effort would go like this:
echo "";
echo "$row[0] ";
if ($row[1] != "none"
is about. Please go read the fine
manual again:
http://ch.php.net/manual/de/language.variables.scope.php#language.variab
les.scope.global
Cheers!
Mike
----
Mike Ford, Electronic Information Services Adviser, Lear
a straight strcmp:
function cmpcountry($a, $b)
{
return strcmp($a['country'], $b['country']);
}
If, however, what you're trying to do is send all blank entries to the end, you
only need the tests for empty string:
function cmpcountry($a, $b)
{
$coun
1100 given above inputs
Then mask the bits that the function will write out of the original value -
negate the mask and use & again:
$a & ~$c // result is 1011
Then combine the two using | (bitwise-or):
($a & ~$c) | ($b & $c) // result is 1001
Cheers!
I think before version
> 5.12.there was a bug, if you want that PHP makes an associative array
> of form elements. http://bugs.php.net/bug.php?id=37276
That's a strictly 5.1.3 bug -- everything's fine in 5.1.2 and previous, and
s a
one-character string containing the character NUL (0x00). It is not the empty
string, and it is not the string "0". Ergo it is TRUE, QED.
> Oddly, if you start with this in the example above:
>
> $as_int = (int) 48;
>
> Then, the is_bool will be false!
Well,
On 08 June 2006 16:20, Ben Liu wrote:
> I probably should add some more details to my question:
>
> The names of the form checkboxes could be changed from ie:
> bool_careers, bool_speaking, bool_internship, etc. to a single array
> bool_questions[], for instance. The problem with that is that I a
t; in the wings. Because if we're having these types of
> discussions with just considering 00-7F characters, then I
> can only guess at what's going to happen when we start
> considering 00-FF code-points.
Well, the PHP manual says: "Note that character variab
You could do it by dynamically generating an image.
Mike
Niels wrote:
On Sunday 04 June 2006 15:30, tedd wrote:
[snip]
You can dynamically generate a table and place text (and/or color) the
cells that are nodes -- that would be my approach. You would need to know
the width and depth of
On 02 June 2006 14:32, Jonas Rosling wrote:
> Hi all,
> is there any easy why to check if a value is odd or not?
if ($value%2):
// $value is odd
endif;
Cheers!
Mike
-
Mike Ford, Electronic Information Se
ame() (and, presumably, ora-bind() before it) *is* Oracle's
parameterized query equivalent -- admittedly not quite as elegant, but no
escaping required and is "rock solid (i.e. no matter how crap [your] input
filtering is SQL injection remains impossible"!).
---
str_replace("'", "''", $str);
-
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley
):
echo date('F', mktime(12, 0, 0, $i, 1));
endforeach;
Cheers!
Mike
-----
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, L
uot;, and sky\'s blue, and \"cool\" stuff. Is this
> > correct way or "correct" way will be to convert quotes in html
> > entities? If yes, means have to use htmlentities($Size,
> > ENT_QUOTES)?
What are your magic_quotes_*() settings? It sounds li
""Rabin Vincent"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On 5/16/06, Mike Walsh <[EMAIL PROTECTED]> wrote:
[ ... snipped ... ]
>
> Is there a way to both display a web page and send content to be saved by
> the user? If someone k
nt prior to sending the CSV stream I get
the 'headers already sent' error message.
Is there a way to both display a web page and send content to be saved by
the user? If someone knows of an example I could look at I'd be greatful.
Thanks,
Mike
--
Mike Walsh - mike_walsh
chris smith wrote:
On 5/14/06, Frank de Bot <[EMAIL PROTECTED]> wrote:
I'll start by compiling php with --enable-debug
At the moment I get backtrace results like this:
#0 0x48c7d95b in memcpy () from /usr/lib/libc_r.so.4
#1 0x8977280 in ?? ()
#2 0x10 in ?? ()
#3 0x894e500 in ?? ()
#4 0x89
I am not seeing a blank page here.
Porpoise wrote:
"tedd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Try this:
http://xn--ovg.com/ajax_page1
Please understand: a) It's a rough estimation as to how many
characters will fit; b) It doesn't handle zoom levels well yet; c)
t;|\[\s*((\d|\w|_)+)\s*\]|", ...
or
preg_replace_callback("@\[\s*((\d|\w|_)+)\s*\]@", ...
or
preg_replace_callback("{\[\s*((\d|\w|_)+)\s*\]}", ...
etc, etc!
Cheers!
Mike
-
Mike Ford, Electronic In
with *only*
integer keys will look like a traditional array.
Cheers!
Mike
-
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Met
$array["ip-$i"]);
endfor;
If your list of prefixes is likely to change at all (e.g. to add a port
number), you could generalize it like this:
$prefixes = array('hostname', 'mac', 'ip', 'port');
$new = array();
for ($i=0; isset($array["{$
we can all agree (we can, right?) that almost *any* kind of decent
layout is better than:
if (...): if (...): // mmh
else: /* oh */ endif; while (...):
if (...): /* oh */ else: if (...): // where am i?
else: /* huh!? */ endif; /* hmm */ endif; if
(...): if (...): /* blah */ endif
where am i?
else:
// huh!?
endif;
// hmm
endif;
if (...):
if (...):
// blah
endif;
// blah
endif;
// blah
endif;
Just beeeautiful! And, oh look, all the end tags tell me which kind of start
tag they should ma
ly applies for functions.
This is likely to be, as Bing deduced, a path error on the include filename.
Bear in mind that include works relative to your file-system's root, not your
Web site's document root -- so is the filename you're using an absolute path
ant is provided for, and as such it
contains the entire session_name=session_id string. As a bonus, it's defined
as the null string when the session id is being propagated in a cookie, so it
can be included unconditiona
m using php 5.0.3-dev. I get the same
> > > info when I telnet to localhost.
This means you have an old php5ts.dll that is being loaded in preference to the
one for 5.1.2.
Locate it and delete it.
This may also fix your other problems.
Cheers!
Mike
----
;s not hard to do this mapping. But if
> given a month
> like '9', is there any PHP function that can convert it to a full
> text month name 'September'?
Yes.
Oh, you want to know what it is?
I expect there's actually several ways, although I'm thinkin
I am currently working on a project using SQL Server 2000. I don't
think there would be a big advantage to switching to sql server 2005
for this project, but is anyone using 2005 (or one of the Express
versions) with PHP? Looks like it only uses the "native client"?
--
Thanks,
Mik
What exactly does the --with in --with-curl mean? I've built php5.1.2
on windows, and I thought that it would compile curl into the binary.
It does not. I still need to declare CURL as an extension in the
php.ini file for it to work. i.e. extension=php_curl.dll
Is this normal behavior? The
-Original Message-
From: ngwarai zed [mailto:[EMAIL PROTECTED]
Sent: 30 March 2006 13:36
I am using Fedora core 4. yes I stopped and restarted apache
On 3/30/06, Ford, Mike wrote:
On 29 March 2006 15:25, ngwarai zed wrote:
> phpinfo says
>
> Configuration File (php.i
and restarted Apache? Which
operating system?
Starting to clutch at straws, now!
Cheers!
Mike
-----
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Gra
.ini not
> refrlected when I run phpinfo() ? Where am I getting it all wrong?
You're not editing the right php.ini -- check phpinfo() for where it
says it's expecting php.ini to be (right near the
1-11-05.
I always suggest working with the *other* 12 o'clock when calculating
purely date offsets -- 12:00 may still shift to 11:00 or 13:00, but this
will not affect the date!
Cheers!
Mike
Mike Fo
Thanks much for your time on this - I'm going to give this code a try
- much appreciated :)
Best,
Mike D
On Mar 28, 2006, at 12:53 PM, Shaunak Kashyap wrote:
Here is my first cut at the problem. It is probably not the most
optimal
solution in terms of algorithmic complexity and it
no, just all the unique combinations. Thanks!
...
Mike Dunlop
Director of Technology Development
[ e ] [EMAIL PROTECTED]
[ p ] 323.644.7808
On Mar 28, 2006, at 11:42 AM, Shaunak Kashyap wrote:
Would you also want the following
"word2 word3",
"word3 word1",
"word3 word2",
"word1,word2,word3"
);
Thanks - MD
On Mar 27, 2006, at 5:55 PM, Chris wrote:
Mike Dunlop wrote:
i have an array of various words and am looking to create a
result arra
Bronislav Klucka wrote:
Hi,
I'm using 2 copies of PHP
1/ on local computer for developing
2/ on web server regular running webs
Is there any way to determine what PHP i'm using? "Where am I?". Can I
somehow define my own constant in php.ini?
Brona
Is the server IP good enough for this? $_SE
Chris wrote:
Mike Milano wrote:
I'm trying to compile PHP with radius enabled. I have the pecl source
and I can use other pecl extensions just fine.
When I type: cscript /nologo configure.js --help, I do not see any
option for radius.
I've also tried to compile the dll by itse
i have an array of various words and am looking to create a result
array of every possible combination of words from the orig array. I'm
not sure how to accomplish this elegantly within a for loop. Anyone
have any ideas?
Thanks - Mike D
ted.
Thanks - MD
...
Mike Dunlop
Director of Technology Development
[ e ] [EMAIL PROTECTED]
[ p ] 323.644.7808
601 - 700 of 3080 matches
Mail list logo