@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28



Comments:

<0> richardlynch: Ah... Sorry, so I don't have to p*** it...
<0> richardlynch: That simplifies things. Thanks..
<1> if I use apache's proxy mechanism, apache'll grab the webpages from whereever and present them itself?
<1> oops
<2> any php coders for hire ?
<3> php-bot: tell jaMaLz about guidelines
<4> hi all, somone here usees AdoDB ?
<3> php-bot: tell nbari about g10
<5> hey guys
<6> hello
<5> can you guys help me with this: http://pastebin.com/656951 im trying to make the <b> in the text area box on lines 99-108
<7> S^Gerbitz: http://php.net/htmlentities is probably what you need.
<8> S^Gerbitz: or a php BBedit tool of some sort, you are doing things backwards
<8> is that 'the' richardlynch
<5> zircu - can I pm you?
<7> zircu: 'the'? I guess so...



<8> S^Gerbitz: it would be best to discuss what ever the situation you have here
<8> richardlynch: I just recognize the name from php-general
<5> zircu - im not sure what you mean by the bbedit tool?
<6> S^Gerbitz: consider writing a function that alters data as you need after you retrieve it...
<7> zircu: Yeah, I guess I've been in PHP-General a little bit. :-)
<5> cyphor - not sure how to do that
<6> well, it appears you are using benign [] tags instead of <> tags... write functions that change that type of stuff back and forth, then when you need them just run your string through it..
<6> have people enter in [b] bold text [/b], and store that in the database... when you go to display it in a text area just leave it alone, but when you want to display it on a web page normally, run it through a function that changes those [b] to <b> and so on...
<8> cyphor: he gave up
<6> I have a form that allows users to set their GMT. As soon as they POST the data I'm playing the $_POST['local_time'] into $local_time then p***ing it to the function http://pastebin.com/656954 to ensure a valid value was p***ed. Do I need to inspect local_time before p***ing it to the function or is what I'm doing secure enough?
<6> playing -> placing*
<7> cyphor: Looks okay to me. I suppose you COULD check the strlen() first, to avoid some kind of overflow on the argument stack...
<6> ah, yes. I'll add that in thanks =)
<7> cyphor: I would change the if/else to just return the value from in_array. Kinda silly to use if/else to return true/false for a function that returns true/false.
<7> cyphor: You could also set the valid offsets in some include file somewhere, and then it would be useful for things like a popup menu etc. At that point, your function is a one-liner, and it can just go away...
<7> cyphor: or keep the function for better clarity. Philosophical difference, really.
<6> that function is actually in an include file by itself
<9> anybody got a second for a newbie question
<9> I am getting this error message
<6> richardlynch: did you mean like 'return in_array($local_time, $valid_offsets, true);'?
<9> Fatal error: Call to a member function getLoad() on a non-object in C:\bla\bla\box.php on line 22
<7> cyphor: Yes
<6> k, yea that's a good idea too, heh =)
<7> s-r: On line 22, you've got $this-> or $xyz->, right? echo out $this or $xyz on line 21.
<9> don't understand - everything looks like normal - object is created and specified as global
<9> no - I have the instancesName->methodname
<7> s-r: Is there a $ in front of that instancesName?...
<10> s-r- and what is line 22?
<7> s-r: If not, PHP thinks it's a constant string 'instancesName'
<9> eg
<9> global $gLibertyLibrary;
<9> if( !$gLibertyLibrary->getLoad( 'goat' ) ) {
<7> 21: echo $gLibertyLibary, "<hr />\n";
<9> give it a shot
<10> Obviously $gLibertyLibrary isn't an object
<10> var_dump will tell you what it is
<9> ahhh - says it is null
<10> Well that's the problem
<9> yep - thanks :)
<10> You probably didn't define it anywhere
<9> no - it is devined at the end of the file that contains it
<9> $gLibertyLibrary = new LibertyLibrary();
<10> I won't even ask
<10> Seeing the word "global" told me pretty much all I needed to know anyway
<9> devined = defined
<9> ahhh - and that would be?
<10> That you need to spend more time learning basic programming
<7> s-r: global is usually a sign of a bad program. That's a gross generalization... But worth zenning on for awhile.
<11> Lol
<9> LOL - I'm trying - honest
<9> :)
<11> only richardlynch would use the term "zenning"
<7> [shrug]
<11> richard: how are you doing, ltns.
<9> all of the objects in this project are global - so I'm fairly much sticking to our standard
<11> !+google lemming
<7> RainMkr: Having fun with PHP CLI segfaulting... Not.
<10> That'll turn out to be a great project
<7> s-r: That's just scary...
<6> richard, I made those changes, much better, thanks =) changed that function to simply return the offsets, then I just run in_array against them when I need to..
<9> check out http://www.bitweaver.org/



<12> Is there like a script or command line utility that will convert a page to pdf?
<10> Ugh, yet another buzzword-compliant site
<7> njdavid: html2pdf??? Google for it. Prolly not PHP, though.
<9> thanks anyway :) I will get there
<12> richardlynch: Does it require anything?
<7> njdavid: Dunno. Just know that's the answer everybody types on PHP-General when this ? comes around... I'm a parrot, mostly.
<7> s-r: If your CMS has every object as a global, then I KNOW I don't want to use it.
<10> If you use globals, you've probably also missed the whole "object oriented" thing quite badly
<11> richardlynch: Liar, you *know* you'll eat it all up. ;)
<11> Dragnslcr: Maybe, maybe not. I'm not sure what's worse a GLOBAL or a singleton
<7> RainMkr: I'm hard to sell on CMS in the first place.
<9> well - the only thing to do then is to join it :)
<11> richardlynch: You and me both. :)
<7> Singleton is worse: They should know better. :-)
<13> anyone have some neat idea on what to put a small computer in? (ie: custom case)
<10> [RainMkr]- well, with a singleton, there's no prerequisite variable name
<11> richardlynch: Then how do you deal with your DB object inside your user object?
<11> Dragnslcr: Very true.
<10> Which also means you can't accidentally overwrite the variable
<10> itrebal- tin foil!
<13> Dragnslcr: hehe, just wrap it
<10> I saw one computer that had a clear plastic case. Looked pretty neat
<9> itrebal: just weld a big steel ring to the top of it - it will make it easier for you to use it as a boat anchor in a year or two
<7> Why would I make a DB object? Let's just leave this at "I have huge philosophical differences with 99.999% of PHP OOP code 'out there', kay?"
<13> s-r: lol, i'm using my computers from 4 years ago still, and this one is too small for a boat-anchor
<11> richardlynch: Again, no disagreement from me. :) However I work with what's given to me.
<9> LOL - so am I
<10> richardlynch- well, if you use PDO, you don't really have a choice
<11> richardlynch: It's that whole "food on the table, roof over the head" thing...
<7> My main desktop is only, like, 10 years old. AMD K-6 450 MHz. Quite zippy.
<13> i need a place in which i'm going to build it in, it changes what kind of power supply i use
<9> with me - it is the monitors that keep dieing
<10> And using a singleton doesn't force you to make the database connection an object. You can make the static property a normal resource if you want
<7> Yeah -- I do code OOP at day job...
<7> I'd have to go with a static in PHP 5, or a function () {static $foo; .. return $foo;} in PHP 4, if I had my 'druthers.
<7> Too bad PHP doesn't have 'cl***' scope variables like Lisp. But then, I say that about 90% of the stuff PHP doesn't have like Lisp.
<13> well, php != lisp... at all
<10> Thankfully
<7> Yeah. So I dunno why they added all that OOP junk. :-)
<7> Seriously: It has way too much of the Java flavor of OOP for my taste. I just hate coffee, basically.
<9> found it - ;)
<10> Well, like it or not, Java pretty much became the de facto standard for OO
<7> This week. :-) Windows guys claim .net will surp*** it. Wanna guess how much I like that?
<14> night everyone
<10> C# is actually really nice
<10> I was quite impressed
<3> Yeah, I hear good things of C# (never tried it myself)
<3> I think some say, "C# is Java done right"
<10> And C#'s basic OO model isn't any different from Java's
<15> mysql_query('INSERT INTO rating(ip, file) VALUES ("'. $ip .'", "'. $file .'"');
<15> ^^ any1 care to tell me why thats not doing anything? :<
<3> php-bot: tell Andy-- about aolbonics
<10> mysql_error can tell you
<3> Andy--: MySQL values are single quoted, not double.
<10> And SQL uses single quotes for strings, not double quotes
<15> argh ofc
<15> sql error grab
<7> After you fix that, you can get rid of the 'dot' operators...
<15> ah
<15> well none of that was breaking it
<15> i'm missing a )
<15> :>
<7> MySQL might maybe let you get away with " instead of ' -- That don't make it Right. Fix it. The '.' operator is optional. "->' is not optional.
<16> is there anyway to merge 2 arrays but make them keep there origional key
<17> ^ATOMIC^: foreach($array1 as $key => $data) $array2[$key] = $data;
<17> this ***umes no overlapping keys, mind you
<11> richardlynch: either " or ' acceptable per SQL92 spec.
<16> numist: yeah i was thinking that but was jsut seeing if there was a function, ebcasue the array_merge function changes teh id's
<17> ^ATOMIC^: if you care about your keys, thats really the best way for it... its still only one or tewo lines
<18> what did this meant?
<18> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRIre/public_html/cart/test2.php on line 8
<18> line reads:
<18> domain: $_GET['domain']\n\n
<6> try $domain = $_GET['domain'];


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

esddsp skype bus error
#gcc
#oe
autologin with Knetworkmanager
acer 3500 touchpad frozen
#web
xming Can't connect
#centos
breezy blacklist vesafb
#ubuntu



Home  |  disclaimer  |  contact  |  submit quotes