Hi Daniel,
Daniel Brown wrote:
BTW:
PHP .net search breaks if you search for
Try this:
www.php.net/
And then scroll down to heredoc section.
Heredoc comes in handy from time-to-time.
Cheers,
M
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?:
Daniel Brown wrote:
Actually, that should be directed at the OP who said that. I was able
to bring up the heredoc, too. ;-P
Ooops! Sorry Daniel, I meant to reply to Nick... My mistake. :(
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?:
Greg Donald wrote:
Try Rubyonrails, it's the best cure for the MVC itch.
Django framework is pretty nice too. :)
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?: http://snipurl.com/w6f8
My: http://del.icio.us/mhulse
--
PHP General Mailing List
Hey Richard! Thanks for the reply. I was hoping someone would re-visit
my questions.
Richard Lynch wrote:
I can GUARANTEE that PHP's wordwrap did NOT issue those cookies.
Oh, for sure. I understand that.
I guess what I was trying to say/ask was this:
1. wordwrap() is a little different
Hi Richard! Thanks again for your help on this one. ;)
Richard Lynch wrote:
These are from some non-PHP session/cookie management setup, I believe.
Ahhh, very interesting! Thanks for the clarification. :)
Call me paranoid.
Better that than spammed! :D
PS Still haven't figured out why
Hi Richard, thanks again for the detailed reply, I really appreciate you
help.
Richard Lynch wrote:
Counting words is almost always a Bad Idea, since you may have users
who use big fat words (University professors and Market-speak) and you
have have texters who, like, don't even use words...
u
Robert Cummings wrote:
I'll take one big scroll any day over 10 pages of ad infestation.
At my part-time job (web content editor at newspaper) we give folks the
option of viewing the multi-page ad infested article as a print
preview which is the same article, but on one page and print ready.
Richard Lynch wrote:
I don't really understand how breaking it up is good unless we're
talking about a series broken up by an author or editor for good
valid semantic reasons...
off-topic
Some good info from book Google Advertising Tools:
Page Size:
How much content should go on each site
Richard Lynch wrote:
It should be as long as a woman's skirt; Long enough to cover
everything important, and short enough to be interesting.
Hehehe! Great quote! :D
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?: http://snipurl.com/w6f8
My:
Hi,
This might be a real obvious question/answer... but I have been up all
night geeking on code, so my mind is kinda mushy -- please be kind. :)
I have a class called Randimg. Within that class, I have several
methods. Within a few of those methods, I use the below code snippet:
Hi Rich! Thanks for the quick reply. I really appreciate your help. :)
Richard Davey wrote:
In PHP 5 could you create $docroot as a protected class constant, but in
PHP 4 the above will have to do.
Ahhh! Very interesting. Many thanks for the code example and explanation
-- that approach
Hi Eric! Thanks for the fast reply. I really appreciate the help on this
one. :D
Eric Butera wrote:
As Rich pointed out you cannot have constants within a class in PHP4.
To answer the second part of your mail, one technique that I have seen
is something like the code below.
Ahhh, that is
Richard Davey wrote:
I don't know if that's the *best* way, personally I'd not really do it
like that, but no-one can tell you it is 'right' or 'wrong' because it
...snip...
Perfect answer! Thanks!
I do not have too many error messages to store, but I do like the
constant approach... Looks
Richard Davey wrote:
Within the constructor for Randimg you could set a local protected
variable:
class Randimg
{
var $docroot = false;
function Randimg ()
{
$this-docroot = $_SERVER['DOCUMENT_ROOT'];
}
Hi Rich and all, just one other quick question...
Which approach below would
Micky Hulse wrote:
Seems like I have always read/heard that it is best to explicitly pass
variables as function parameters... vs throwing around globals.
Ah, well Chapter 6, page 144-145 have helped clear-up a little bit of my
confusion:
...snip...
Here's a simple class definition
Micky Hulse wrote:
Ah, well Chapter 6, page 144-145 have helped clear-up a little bit of my
confusion:
Sorry, forgot to mention what book I was refering to:
O'Reilly Programming PHP By Rasmus Lerdorf Kevin Tatroe
http://snipurl.com/1k4ug
--
Wishlists: http://snipurl.com/1gqpj
Switch
Hi Eric! Thanks for your reply. :)
Eric Butera wrote:
If at all possible you're going to want to use PHP5 if you're doing
...snip...
of those problems have been alleviated.
Gosh! I wish I could use PHP5... Unfortunately the hosting company I am
using has not upgraded. I can not wait to start
Hi,
I am in the process of writing a simple but useful plugin for a blogging
application
Long story short, I want to give-back to the community (i.e. free
plugin), but would like to make an attempt at retaining some credit if
folks port/use to/in other scripts/blogs/cms apps.
Any tips
Micky Hulse wrote:
Or, should I just not worry about this?
Well shux! I love it when I answer my own questions:
http://www.phpfreaks.com/tutorials/19/0.php
I blame it on lack of sleep!
The GNU GPL License sounds like what I need. :D
Cheers,
M
--
Wishlists: http://snipurl.com/1gqpj
Daniel Brown wrote:
If you want to retain some credit but don't care about
distribution/modification/redistribution, check out the MIT license (more
commonly referred to as the X or X11 license). We're using it in a project
Ah, great tip! :D
I will definitely read-up on the MIT license
Hey! Tijnema! Thanks for the quick reply. :)
Tijnema ! wrote:
I'd say, don't worry too much about the license, just put your name on
top of the code, and some other nonsense, like:
You're allowed to use this code, as long as you leave above lines
intact., where above your credit is listed of
Crayon Shin Chan wrote:
Don't forget the MIT license allows people to incorporate your code into
commercial products and sell for profit without having to give anything
back (money/improved code/etc).
Hi Cayon, thanks for clarification.
I just woke up, so I have not had a chance to really
Daniel Brown wrote:
Right, I alluded to that, but perhaps I should've said that exactly, as
it may bother some people. In my case, it doesn't bother me in the least,
just as I use LAMP (all open source) to make a living.
Oh, I think I understood that. But there is always room for
Howdy,
I just wanted to say, to all who responded, many many thanks for the
help. I greatly appreciate it. I have not made my decision just yet, but
it has been great hearing the advice and reading about all the different
options available... Well, anyay, thanks! This list has been a life
Hi folks, I hope everyone is having a good week. :)
Let me cut to the chase... Basically, I need to get this:
http://www.site.com/folder/foo
To work like this:
$_SERVER['DOCUMENT_ROOT'].'folder/foo/file.ext';
For use with getimagesize() and a few other functions (trying to avoid
possible
Micky Hulse wrote:
/*
** Output:
** /web1/httpd/htdocs/blogs/images/uploads
*/
Ooops, typed that wrong, example output should be:
/web1/httpd/htdocs/folder/foo
--
Wishlists: http://snipurl.com/1gqpj
Switch: http://browsehappy.com/
BCC?: http://snipurl.com/w6f8
My: http
Robin Vickery wrote:
use parse_url()
http://www.php.net/parse_url
then append the 'path' part to document root ?
OMG, that looks like it will do the trick!
Jeez, how did I miss that. I feel like a dufus.
Are list members allowed at least one RTFM question per month? :D
Thanks Robin! I
Hi,
Code:
=
ob_start();
switch ($this-command)
{
case 'include':
@include($x);
break;
default:
@readfile($x);
}
$data = ob_get_contents();
ob_end_clean();
=
The above code snippet is used in a class which would allow
if allow_url_include is turned off, you don't have to worry much about http,
if '.' is a invalide char, you can't include *.php...
the include path probably should be the inc(whatever the name)
folder(not accessible from web) instead of the web root and '..'
should be disallowed
Hi Ryan!
Hi,
Code:
=
ob_start();
switch ($this-command)
{
case 'include':
@include($x);
break;
default:
@readfile($x);
}
$data = ob_get_contents();
ob_end_clean();
=
The above code snippet is used in a class which would
Hi Michiel! Thanks for the help, I really appreciate it. :)
It depends. What's exactly do you want to prevent? It doesn't seem like a
...snip...
include, say, additional HTML content, use file_get_contents() instead.
Very good points. My goal was to write a plugin that would allow me to
What do ya'll think? Any suggestions?
Sorry for the duplicate posting... I had some problems signing-up for
the list. :(
Also, I moved my test code to sniplr:
http://snipplr.com/view/32192/php-security-include-path-cleansing/
TIA!
Cheers
M
--
PHP General Mailing List (http://www.php.net/)
On Sun, Apr 18, 2010 at 10:23 AM, Michiel Sikma mich...@thingmajig.org wrote:
I would prefer to use include() since it runs the code in the same context,
...snip...
with your data rather than printing it right away.
Thanks for the reply Michiel, I really appreciate it. :)
For some benchmarks
Hi Michiel!
One thing to keep in mind is that this one doesn't take eval() vs regular
include execution time into account, in case you were still considering
using it. According to this page, it's many times
I was still considering it... I mean, I am still exploring all my
options for the
If anyone has anything similar to this please let me know.
SlidesShowPro Director:
http://slideshowpro.net/products/slideshowpro_director/
You could use the Director API and create a PHP gallery with your own
code, or you could use the SlideShowPro flash player.
The Director interface is very
$_SERVER['DOCUMENT_ROOT']
although a post on the manual mentions some variability between
environments.
$root = (array_key_exists('DOCUMENT_ROOT', $_ENV)) ?
$_ENV['DOCUMENT_ROOT'] : $_SERVER['DOCUMENT_ROOT'];
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Some style guides you might find interesting (the Code Igniter style
guide might be the most relevant to this discussion):
Django: Coding style
http://tinyurl.com/bn8jv8
ExpressionEngine: General Style and Syntax
http://tinyurl.com/dfh7fa
Flex: SDK coding conventions and best practices
On Mon, Sep 13, 2010 at 2:43 PM, chris h chris...@gmail.com wrote:
How would you like the system to be aware of rather or not you're in the
office?
On his way in to the office:
Motion sensing camera connected to a mechanical pointer stick aimed to
trigger the server power button.
On his way
On Mon, Sep 13, 2010 at 5:05 PM, Daniel Brown danbr...@php.net wrote:
It would be cheaper to employ the same method used on some
lawnmowers and required on Jet Skis and Skidoos: a cable with a clip
worn by the rider. The rider falls off, the cable releases from the
vehicle, disengaging the
If I understand the question correctly, I think the answer is yes.
Maybe something like this:
?php if ($AlertUser2success): ?
Normal HTML, or MT tags, here.
?php elseif ($foo == $bar): ?
Normal HTML, or MT tags, here.
?php else: ?
Normal HTML, or MT tags, here.
?php endif; ?
Hi,
I must be tired because I can't figure this out... I am sure it is
something obvious.
I need to pass a hex value to a method, but I can't figure out how to
convert a hex string to a hex value.
For exmaple:
$base = '96989b'
my_method('0x' . $base)
The above does not work with my_method().
Hi Adam! Many thanks for you quick reply and for the help. :)
On Thu, Oct 21, 2010 at 11:31 PM, Adam Richardson
In your second example, you're directly inputing a hex number, so there's no
issue.
Interesting... I wish I could just input the hex directly,
unfortunately I don't have that option.
On Thu, Oct 21, 2010 at 11:45 PM, Micky Hulse rgmi...@gmail.com wrote:
Hmmm, I wonder if I am going about this all wrong.
OMG, too easy:
my_method(hexdec('0x' . $base))
How did I miss that!?! I could swear I tried that earlier.
Sorry to bug ya'll!
Cheers,
Micky
--
PHP General Mailing List
Hello,
I was looking at this ExpressionEngine plugin:
http://expressionengine.com/downloads/details/xml_encode/
Description: This plugin converts reserved XML characters to entities.
It is used in the RSS templates.
... Curious about this code:
trim(str_replace(array('#47;', 'nbsp;'),
Hi Richard! Thanks for the reply, I really appreciate the help. :)
On Tue, Nov 30, 2010 at 5:49 AM, Richard Quadling rquadl...@gmail.com wrote:
I'm guessing that nbsp; is only valid in HTML.
I see.
Ah, it looks like I need to be Googling for htmlentities and xml.
Thanks for tip!
Not sure
On Mon, Dec 27, 2010 at 5:29 PM, Michelle Konzack
linux4miche...@tamay-dogan.net wrote:
I have gotten some ideas and now I start coding my own stuff, which is
more flexibel in design and such.
Hrmm, just found this info:
http://blog.dixo.net/2009/09/15/pastebin-org-considered-harmful/
So, I
On Wed, Jan 19, 2011 at 6:45 AM, Joshua Kehn josh.k...@gmail.com wrote:
On Jan 19, 2011, at 9:43 AM, Jay Blanchard wrote:
[snip]
...
[/snip]
Imagine when there'll be the day when you do not have to code at
all...just copy 'n paste snippets together in the order that you wish
them to work in
On Tue, Feb 15, 2011 at 2:00 PM, David Harkness
davi...@highgearmedia.com wrote:
I use KR. I started with it just as shown but as monitors increased in size
I stopped cuddling the else so it's now on its own line, aligning the if,
elseif, and else nicely. One of the developers at my company
Maybe try:
echo 'getText(p1)';
I think that should work.
Good luck.
Cheers,
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, May 9, 2011 at 2:56 PM, tedd tedd.sperl...@gmail.com wrote:
Really?
How does the blind via readers, such as JAWS, understand what a B is?
First, never use B -- or I for that matter.
Second, use strong or em instead. Readers can understand and render
STRONG and EMPHASIZED text, but not
On Mon, May 9, 2011 at 4:18 PM, Joshua Kehn josh.k...@gmail.com wrote:
If you are only make the last name bold for stylistic purposes you should
use CSS and a class. If you have text that needs to be emphasized or
strongly put use the appropriate tags.
Hrmm, I personally don't think there is
[OT]
Thanks for the informative reply Tedd.
I respect your opinion and I don't think my approach is more right
than yours. I am wondering if this is just a DTD thing. I always use
an HTML 4.01 strict DTD and have not used an XHTML doctype in ages.
As far as I can tell, the specs in XHTML say
Hi Tedd!
On Sun, May 15, 2011 at 4:41 PM, tedd tedd.sperl...@gmail.com wrote:
I vaguely remember using b tags in the markup for SEO considerations with
the idea that I was going to change them to strong with a search/replace.
Unfortunately, that did not happen until now. Thanks for letting me
What do you think this means.
This code:
[code]
?php
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
include_once('Mail.php');
include_once('Mail_Mime/mime.php');
?
[/code]
Outputs these error messages:
On Fri, May 27, 2011 at 10:27 AM, Micky Hulse
mickyhulse.li...@gmail.com wrote:
Would it be safe for me to conclude that Pair is not setup properly?
Haha, Pear the package, not the host. :D
http://www.pair.com/
Typo. My bad.
Also, what the heck does this mean:
It is not safe to rely
On Fri, May 27, 2011 at 12:06 PM, Philip Thompson
philthath...@gmail.com wrote:
The host is apparently using PHP 5.3 - this message started to appear in
this version. Use date_default_timezone_set() somewhere in your code to
explicitly set your timezone. I'm in the central US, so I use
Looks like the host changed my include path:
(include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/php/PEAR')
I am still getting file not found include errors.
I am guess that Mail.php and Mail_Mime/mime.php are extras that are
not installed.
This is my first time trying to use Pear.
On Fri, May 27, 2011 at 12:48 PM, Micky Hulse rgmi...@gmail.com wrote:
Looks like the host changed my include path:
I will probably ditch the whole Pear idea and use something else.
Well, actually, it looks like having PEAR on the include path did help.
Mail.php was found... It was Mail_Mime
The WebDesign-L has been around since early 1997... For as long as I
can remember, the policy (on all list-servs I post to) has been no
top posting and trim quotes.
Here's WD-L's policy page:
http://webdesign-l.com/policies/
Lot's of great info there...
Under the Message Body heading:
[[
Do
OP:
Can we see the methods in question?
Have you tried running the code on a different server/host?
Have you added any scaffolding to your methods in order to test your
caching theory? This would be the first thing I would try (i.e. create
random number (or whatever), concat with variable vals
+1 for GitHub or BitBucket.
I have not visited SourceForge for years... I just like using Git myself.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
They must mean labels as in general naming convention rules for
programming... Like not naming a variable/function label with a number at
the front.
Here's a page about variables:
http://www.php.net/manual/en/language.variables.basics.php
Variable names follow the same rules as other labels in
Under the CSS section:
No way to modularize or programmatically generate lengths. Can't say:
{ width:50% - 2px; }
That's so true!! I wish I could do the above...
Oh, and why is the PHP section so damned long?!?
Good read, thanks. :)
--
PHP General Mailing List (http://www.php.net/)
To
On Thu, Jul 14, 2011 at 4:02 AM, Richard Quadling rquadl...@gmail.com wrote:
My daughter (6 or 7 at the time) came up with T, M and E. I was
abso-bloody-lutely amazed she managed to find a word starting with T,
M and E.
What was the word?
--
PHP General Mailing List (http://www.php.net/)
To
On Thu, Jul 14, 2011 at 4:19 PM, George Langley george.lang...@shaw.ca wrote:
He gave you a beautiful hint:
:: slaps self on forehead ::
I should've known!!! :D
Thanks!
Micky
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
+1 for CI.
If you search the group archives, a little while back I asked about
micro PHP frameworks and got a ton of good replies.
So folks, how'z about a PHP framework with a built-in admin interface?
That would be pretty sweet. :)
--
PHP General Mailing List (http://www.php.net/)
To
On Thu, Jul 21, 2011 at 5:21 PM, Jim Lucas li...@cmsws.com wrote:
So, what would said admin interface allow you to administrate?
Your app models?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, Jul 21, 2011 at 5:33 PM, Micky Hulse rgmi...@gmail.com wrote:
Your app models?
More specifically, your app model data. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Thu, Jul 21, 2011 at 6:44 PM, Shawn McKenzie nos...@mckenzies.net wrote:
A la CakePHP. Will automagically build controllers and views for the
admin of your tables/models if you wish.
Oooh, interesting! I will check out CakePHP! Thanks for tip! :)
--
PHP General Mailing List
On Tue, Jul 26, 2011 at 3:47 PM, Tim Streater t...@clothears.org.uk wrote:
that I will get an error if I try to reference $info[extension] ??
From what I can tell via reading the docs:
The following associative array elements are returned: dirname,
basename, extension (if any), and filename.
Was there ever a time when having a comma at the end of the last array
element was not acceptable in PHP?
I just did a few quick tests:
https://gist.github.com/1761490
... and it looks like having that comma ain't no big deal.
I can't believe that I always thought that having the trailing
Hi Ashley! Thanks for your quick and informative reply, I really
appreciate it. :)
On Tue, Feb 7, 2012 at 12:10 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
It's easy to add and remove elements without making sure you have to check
the trailing comma. It's also OK in Javascript to use
On Tue, Feb 7, 2012 at 12:15 PM, Paul M Foster pa...@quillandmouse.com wrote:
I've always avoided trailing array commas, but only because I was under
the impression that leaving one there would append a blank array member
to the array, where it might be problematic. Yes? No?
Yah, ditto! :D
In
On Tue, Feb 7, 2012 at 12:19 PM, Micky Hulse rgmi...@gmail.com wrote:
Yah, ditto! :D
$s = 'foo,bar,';
print_r(explode(',', $s));
The output is:
Array
(
[0] = foo
[1] = bar
[2] =
)
That's one instance where I know you have to be cautious about the
trailing delimiter.
I know
On Tue, Feb 7, 2012 at 12:32 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
That's because it's not an array you've got the trailing delimiter on, it's a
string.
Right. Sorry, bad example.
it was just the one example I could think of where you could get an
empty element at the end of
On Wed, Feb 8, 2012 at 9:58 AM, Larry Garfield la...@garfieldtech.com wrote:
Drupal's coding standards encourage the extra trailing comma on multi-line
arrays, for all the readability and editability benefits that others have
mentioned. We have for years. Cool stuff. :-)
Yah, I love that
On Wed, Feb 8, 2012 at 10:08 AM, Robert Cummings rob...@interjinn.com wrote:
JavaScript in Internet Crapsplorer spanks you on the bottom every time you
have a trailing comma in a JS array. That may be where you picked up the
aversion.
On Wed, Feb 8, 2012 at 10:10 AM, Micky Hulse rgmi
Howdy!
Example code:
https://gist.github.com/1928452
What would be the best way to insert $o_insert array into $o array
after specified key?
I hate to just ask for example code, but I can't seem to find the
perfect solution. :(
Many thanks in advance for the help!
Cheers,
Micky
--
PHP
Thank you Eray! That's a cool approach. Testing code now. I will be
back with my results. :)
Thank you!!!
Cheers,
M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Xucheng,
On Mon, Feb 27, 2012 at 7:41 PM, xucheng helloworldje...@gmail.com wrote:
Maybe you can trans the array into a xml tree , then modify its leaves .
Now that sounds like an interesting idea... I will have to research
that as an option. Thanks for tip! :)
@Eray,
I was not able to get
On Tue, Feb 28, 2012 at 8:36 AM, Shawn McKenzie nos...@mckenzies.net wrote:
Might be an easier way but this should work. You can sort the $before =
true out for yourself :-)
Hi Shawn, I've updated your function to do the $before bit:
https://gist.github.com/1928452#file_array_insert.php
I
Hi Adam!
On Tue, Feb 28, 2012 at 2:05 PM, Adam Richardson simples...@gmail.com wrote:
What would be the best way to insert $o_insert array into $o array
after specified key?
Great question. :D
Quick answer: It's a Wordpress thang!
Long answer: I am working with WordPress and the theme that I
Hello,
On Fri, Mar 2, 2012 at 8:07 AM, Jim Lucas li...@cmsws.com wrote:
But on some of my servers, curl isn't enabled! Is there any equivalent
code
to achieve the same?
I've used a combination of output buffering [1], readfile() [2] and
caching (specific to the framework I was using).
On Mon, Sep 3, 2012 at 3:52 PM, Tedd Sperling t...@sperling.com wrote:
Maybe if I was on a Windoze machine, but I'm on a Mac.
What about TextEdit.app?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It should still work. You might need to turn on the short tag option
in your conf file.
http://stackoverflow.com/a/2185331/922323
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, Apr 17, 2013 at 3:59 PM, Micky Hulse rgmi...@gmail.com wrote:
You might need to turn on the short tag option
in your conf file.
Sorry, ini file, not conf. Been a long day. :D
I guess I should have asked if short tags are turned on for your 5.3.3?
--
PHP General Mailing List (http
Ah, I see now. Sorry, I must have read the original question wrong.
There's a good thread on stack about short tags:
Are PHP short tags acceptable to use?
http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use
Which kinda links to the docs:
PHP tags
On Thu, Apr 18, 2013 at 8:36 AM, Larry Martell
la...@software-horizons.com wrote:
That was it. Thanks!!
Np. Glad it helped. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Jun 14, 2013 at 8:52 AM, Tedd Sperling t...@sperling.com wrote:
Here's the problem -- I need to count the number of times a user activates a
LightBox -- how do you do that?
If you're using Google Analytics, you can use click tracking:
Example/working code here:
https://gist.github.com/mhulse/5833826
Couple questions:
1. Is there anything wrong with the way I'm using the abstract class?
If so, how could I improve the logic/setup?
2. Is there a way for me to pass $foo to the parent class, from the
child, without having to
On Fri, Jun 21, 2013 at 12:54 PM, Micky Hulse
mickyhulse.li...@gmail.com wrote:
2. Is there a way for me to pass $foo to the parent class, from the
child, without having to ferry that variable through the abstract
class?
I should mention, I'm working on some code where I don't have the
ability
Thanks for tips David! I'll play with your suggestion.
I've never used abstract methods, but if I'm understanding the code
you posted, they look pretty useful.
I may be back with questions.
Appreciate the help. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi all!
Example code:
https://gist.github.com/mhulse/6441525
Goal:
I want to have a utility class that contain utility methods which should
have the option of being called multiple times on a page.
I think my main goal is to avoid having to new things ... I don't really
need to create an
Thank you so much for the quick and very informative/educational
replies Stephen and David, I really appreciate it! :)
On Wed, Sep 4, 2013 at 12:36 PM, Stephen stephe...@rogers.com wrote:
This sounds simply like a library of functions that are implemented using
objects.
Instantiate your static
Thanks Stephen! I really appreciate the help! :)
In my PHP ventures over the years, I haven't made much use of static
variables/methods/properties ... I was thinking they might be useful
for this one bit of code, but based on your feedback (and David's) I
think I'll be heading down a different
Hi Rodrigo, thanks for the help, I really appreciate it!
On Wed, Sep 4, 2013 at 5:55 PM, Rodrigo Santos
rodrigos.santo...@gmail.com wrote:
Hi, first, sorry for the bad English.
Not bad at all! Very clear and well written reply (heck, it's better
than my native English writing), so thank you! :)
On Wed, Sep 4, 2013 at 11:07 PM, Robert Cummings rob...@interjinn.com wrote:
I'll second Rodrigo's opinion, but would like to comment that the name of
the class is misleading since it's called Singleton. The singleton pattern
is used when you only ever want one instantiation of a class. In your
On Thu, Sep 5, 2013 at 12:15 PM, Robert Cummings rob...@interjinn.com wrote:
Probably sufficient (and easier for typing) to just call it Utility since it
follows the pattern but isn't the pattern itself :)
Good call! Updated the example code.
Thanks again! I really appreciate the help. :)
101 - 198 of 198 matches
Mail list logo