php-general Digest 14 Jan 2011 15:44:20 -0000 Issue 7132
Topics (messages 310747 through 310758):
Re: Rewriting string]
310747 by: Nathan Rixham
310748 by: Daniel Brown
310749 by: kbailey.howlermonkey.net
A bad design decision or pure genius?
310750 by: lists.pruimphotography.com
310751 by: Joshua Kehn
310752 by: lists.pruimphotography.com
310753 by: Daevid Vincent
310754 by: lists.pruimphotography.com
Re: query strings and other delights
310755 by: David Robley
php-fpm does'nt work
310756 by: mufenggu
310757 by: Sharl
Bare Strings, are they deprecated?
310758 by: Evil Son
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 ---
Dan, you misread, I fwd'd the email, that was Richards reply to me.
You should know I don't reply to people in such a manner by now :)
Best,
Nathan
Daniel Brown wrote:
On Thu, Jan 13, 2011 at 15:41, Nathan Rixham <[email protected]> wrote:
Really?
That is what you think it does?
If so quit the mail list your a fucking idiot.
That should be "you're," Nathan.
Admin wrote:
$categorys = array('home', 'services', 'gallery', 'about_us',
'contact_us', 'testimonials');
If(in_array($_GET['page'], $categories))
My guess is Richard (Buskirk) glanced at it and thought it was a
foreach() or similar loop. We've all made similar mistakes and blamed
other folks for them.
--- End Message ---
--- Begin Message ---
On Thu, Jan 13, 2011 at 16:31, Nathan Rixham <[email protected]> wrote:
> Dan, you misread, I fwd'd the email, that was Richards reply to me.
>
> You should know I don't reply to people in such a manner by now :)
Thought it was a bit odd, but in Gmail, it didn't show forwarding,
only a reply - seemingly written by you - underneath the headers, so I
thought it was a second reply by you to him.
So then.... seems there's more than one person who should know
what the $#%@ they're talking about before they reply. ;-P
--
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/
--- End Message ---
--- Begin Message ---
This is quite correct, "YOU'RE" is a contraction of YOU and ARE. YOUR
on the other hand is a possessive statement, indicating that something
belongs to someone. Therefore, it would be to say this list is his
fucking idiot, which is obviously untrue, as I have never been fucked
by this gent, not by the membership of this list. And WERE he to be
saying this list is his fucking idiot, he should have removed the 'a',
which is superfluous to such a statement.
Thus, the list digresses from the discussion of an artificial language
to a natural one, English. One could at this point speculate as to the
aassorted properties of the author of this wonderous statement, but
that would be uncouth.
Fnord.
-Kirk
Quoting Daniel Brown <[email protected]>:
On Thu, Jan 13, 2011 at 15:41, Nathan Rixham <[email protected]> wrote:
Really?
That is what you think it does?
If so quit the mail list your a fucking idiot.
That should be "you're," Nathan.
Admin wrote:
$categorys = array('home', 'services', 'gallery', 'about_us',
'contact_us', 'testimonials');
If(in_array($_GET['page'], $categories))
My guess is Richard (Buskirk) glanced at it and thought it was a
foreach() or similar loop. We've all made similar mistakes and blamed
other folks for them.
--
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hey Everyone,
I have a question about php & javascript... Yes I know this forum is
for php BUT I needed an opinion on where to look for stuff...
I have a application that I'm working on that uses google maps to
display interactive maps (using javascript) on the website. I now have
the need to display multiple maps on the same page and from what I can
tell I have to create new instances and variables for all of them...
What I'm wondering is since I know very little javascript would it be
bad to create a PHP function to write the java code for the proper
number of maps I need to display? The map info is being pulled from a
database where events are being added and could contain 2 or 200 maps...
Or should I learn javascript and figure out how to create a loop in
there so that I can just loop it in the java and not repeat code?
Thanks for any assistance you can give!
Jason Pruim
[email protected]
--- End Message ---
--- Begin Message ---
On Jan 13, 2011, at 7:49 PM, [email protected] wrote:
> Hey Everyone,
>
> I have a question about php & javascript... Yes I know this forum is for php
> BUT I needed an opinion on where to look for stuff...
>
> I have a application that I'm working on that uses google maps to display
> interactive maps (using javascript) on the website. I now have the need to
> display multiple maps on the same page and from what I can tell I have to
> create new instances and variables for all of them...
>
> What I'm wondering is since I know very little javascript would it be bad to
> create a PHP function to write the java code for the proper number of maps I
> need to display? The map info is being pulled from a database where events
> are being added and could contain 2 or 200 maps...
>
> Or should I learn javascript and figure out how to create a loop in there so
> that I can just loop it in the java and not repeat code?
>
> Thanks for any assistance you can give!
>
> Jason Pruim
> [email protected]
>
>
Love the lists@ email address there.
My preference would be to invest some time in frontend (JavaScript) skills, as
that would be the most "proper" way to implement it. If you don't have the
time, might as well use whatever tools you are most comfortable with. Could
turn into a bit of a mess though.
Regards,
-Josh
____________________________________
Joshua Kehn | [email protected]
http://joshuakehn.com
--- End Message ---
--- Begin Message ---
On Jan 13, 2011, at 7:54 PM, Joshua Kehn wrote:
On Jan 13, 2011, at 7:49 PM, [email protected] wrote:
Hey Everyone,
I have a question about php & javascript... Yes I know this forum
is for php BUT I needed an opinion on where to look for stuff...
I have a application that I'm working on that uses google maps to
display interactive maps (using javascript) on the website. I now
have the need to display multiple maps on the same page and from
what I can tell I have to create new instances and variables for
all of them...
What I'm wondering is since I know very little javascript would it
be bad to create a PHP function to write the java code for the
proper number of maps I need to display? The map info is being
pulled from a database where events are being added and could
contain 2 or 200 maps...
Or should I learn javascript and figure out how to create a loop in
there so that I can just loop it in the java and not repeat code?
Thanks for any assistance you can give!
Jason Pruim
[email protected]
Love the lists@ email address there.
My preference would be to invest some time in frontend (JavaScript)
skills, as that would be the most "proper" way to implement it. If
you don't have the time, might as well use whatever tools you are
most comfortable with. Could turn into a bit of a mess though.
Hey Josh,
Yeah the lists@ address just makes it easier since I am syncing email
with my smart phone I didn't want to get all of this list plus the
many others I'm on to get synced... I doubt my phone could handle it
hehehe.
In the long run I want to learn javascript... But this new requirement
just popped up on me on a project that I was working on... So I was
gauging what was going to be easier :)
Thanks for the response!
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> Sent: Thursday, January 13, 2011 4:50 PM
> To: [email protected]
> Subject: [PHP] A bad design decision or pure genius?
>
> Hey Everyone,
>
> I have a question about php & javascript... Yes I know this forum is
> for php BUT I needed an opinion on where to look for stuff...
>
> I have a application that I'm working on that uses google maps to
> display interactive maps (using javascript) on the website. I
> now have
> the need to display multiple maps on the same page and from
> what I can
> tell I have to create new instances and variables for all of them...
>
> What I'm wondering is since I know very little javascript
> would it be
> bad to create a PHP function to write the java code for the proper
> number of maps I need to display? The map info is being
> pulled from a
> database where events are being added and could contain 2 or
> 200 maps...
>
> Or should I learn javascript and figure out how to create a loop in
> there so that I can just loop it in the java and not repeat code?
>
> Thanks for any assistance you can give!
>
> Jason Pruim
> [email protected]
Not sure why you would need to show more than a single map at any given
time. Therefore why not use PHP to show a list of possible maps and when
the user clicks on one, use AJAX to populate a single map on demand?
--- End Message ---
--- Begin Message ---
On Jan 13, 2011, at 8:53 PM, Daevid Vincent wrote:
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, January 13, 2011 4:50 PM
To: [email protected]
Subject: [PHP] A bad design decision or pure genius?
Hey Everyone,
I have a question about php & javascript... Yes I know this forum is
for php BUT I needed an opinion on where to look for stuff...
I have a application that I'm working on that uses google maps to
display interactive maps (using javascript) on the website. I
now have
the need to display multiple maps on the same page and from
what I can
tell I have to create new instances and variables for all of them...
What I'm wondering is since I know very little javascript
would it be
bad to create a PHP function to write the java code for the proper
number of maps I need to display? The map info is being
pulled from a
database where events are being added and could contain 2 or
200 maps...
Or should I learn javascript and figure out how to create a loop in
there so that I can just loop it in the java and not repeat code?
Thanks for any assistance you can give!
Jason Pruim
[email protected]
Not sure why you would need to show more than a single map at any
given
time. Therefore why not use PHP to show a list of possible maps and
when
the user clicks on one, use AJAX to populate a single map on demand?
Hey Daevid,
That is a great idea... The only issue is i don't know ajax yet :)
But it's on my list of things to do this year!
What I ended up doing is just putting a static image in which is
generated automatically by google on the fly using the GPS coordinates
that I supply, it places a marker on the image, and then it links into
a full map where you can pan, zoom, get directions etc. etc.
So just needed to think out side the box a little bit!
And... For the archives... YES that would have been a bad design
decision. It was a crutch to get me through until I can learn more
javascript and start mastering that.
Thanks for the help! :)
--- End Message ---
--- Begin Message ---
[email protected] wrote:
> ...Holy cow... nothing to extract the query string, it's automatically
> part of the environment. So I just do work with the $_GET string, it's
> in there already... yikes.
>
>
You might find phpinfo() particularly useful as an indicator of how php is
configured and most of the built in variables such as environment
variables.
Also http://php.net/manual/en/language.variables.external.php
http://php.net/manual/en/reserved.variables.php
Spend a little while perusing the documentation at php.net - it is very
good. And php.net/function-name is a handy way of looking up a specific
function.
Cheers
--
David Robley
Diagonally parked in a parallel universe.
Today is Prickle-Prickle, the 14th day of Chaos in the YOLD 3177.
--- End Message ---
--- Begin Message ---
hi, i just install nginx-0.8.54, php-5.3.5, mysql-5.5.8
in nginx.conf i pass .php file to php-fpm(127.0.0.1:9000)
i can get static file like index.html, but i got a blank page from
simple test.php file, there only one command:
<?php phpinfo(); ?>
and no errors print out, i set all display_errors=on, and it doesn't work.
i guess nginx can connect to php-fpm, but php-fpm seem to not intepret php file.
and i compile php against apache apxs2, it works!!!
can somebody help me out. thanks so much
--- End Message ---
--- Begin Message ---
check your nginx configuration.
mufenggu <[email protected]>编写:
>hi, i just install nginx-0.8.54, php-5.3.5, mysql-5.5.8
>in nginx.conf i pass .php file to php-fpm(127.0.0.1:9000)
>i can get static file like index.html, but i got a blank page from
>simple test.php file, there only one command:
>
><?php phpinfo(); ?>
>
>and no errors print out, i set all display_errors=on, and it doesn't work.
>i guess nginx can connect to php-fpm, but php-fpm seem to not intepret php
>file.
>
>and i compile php against apache apxs2, it works!!!
>can somebody help me out. thanks so much
--- End Message ---
--- Begin Message ---
Hello group,
I am a new and just an occasional user of PHP and would like some direction.
I find the use of bare strings as array keys pleasant to work with,
easy on the eye and quick to type. I understand that this use of bare
strings is not encouraged because of possible conflicts with key words
and constants and to a lesser degree loss of some performance.
I tend to use all capitals for my constants and never for my array
keys (if bare). In addition, collisions with PHP keywords fails fast
when they happen. My application is for personal use, and any
performance degradation is insignificant.
However, I can imagine having collisions with constants defined by
libraries that I may use.
Have you found the use of bare strings a significant issue? Or do the
benefits outweigh the dangers? Perl and Tcl both have them. I like
them in PHP too.
Thanks.
--
Regards
Evil Son
--- End Message ---