@# 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



Comments:

<0> Narada: there should be some lines enabling it in your php.ini
<1> Jy: no there isn't any entry for anything zend related
<2> there is nothing sadder than people who write love lyrics in their quit messages
<3> hah
<1> hehe
<1> hmm wait i might have found the problem
<4> caffinated: it could be worse...it could be emo lyrics
<5> caffinated: starving children is sadder, i think
<1> would it be even worse if you were reading the love lyrics in the quit messages?
<1> :)
<1> (i read them too though :)
<4> Narada: no, that may just mean you're a compulsive reader
<6> when converting a date to a unix timestamp via strtotime(), if the date is in the format "Y-m-d", what time does strtotime add to it? 00:00:00?
<7> m-00kie: It doesn't add anything, but yes, it ***umes that a date with no time is midnight on said date.
<6> well considering that date() with parameters "Y-m-d" doesnt return a H:i:s, strtotime() HAS to add to it :) thanks thats exactly what i was hoping for.
<7> m-00kie: "add" is a misnomer. It ***umes midnight.



<8> how do I make a new file?
<8> searched the manual
<8> but cant find anything
<9> is there a way to cache compiled regex's?
<10> ralle89: php.net/fopen
<10> look at the mode table
<8> but can it make a new file itself?
<10> yes, as explaned under "Table 1. A list of possible modes for fopen() using mode"
<10> *explained
<8> I cant find out how to make a file and write to it
<10> http://php.net/fwrite
<11> Pollita, haha, you devil's worker you
<12> no more ocean dumpage!
<12> haha
<11> I got a good laugh out of that question
<13> The truth is, I just like to see my name in the weekly summaries
<8> $file = fopen('wc3maps/funny.txt','x'); file_put_contents($file,'iloveyou');
<13> You heard me, I'm a media whore
<8> this doesnt work :S
<14> Pollita: and the Changelog
<13> zircu: Changelog shamangelog.... It's all about the phpcredits() page
<11> Pollita, haha, so am I, in my own little areas, not yet in teh PHP world :-P
<14> hmm.. actually you arn't listed there, at least on 4.4.2's changelog
<14> it would help if i searched for the right name though
<14> yeah, the phpcredits() is a better list to get on, heck, my name my be listed in changelog somewhere
<15> I can overload the constructor of a cl*** in php4, right?
<13> YEs and no
<13> In proper overloading sense? no
<13> Using variable argument parsing? yes
<15> oh
<15> so i can have one constructor be like function calendar() and the other be function calendar($month, $year) ?
<15> I'd have to get func_num_args()?
<15> check, rather
<16> hi
<16> how can i create a form, that when it is submitted, it puts the info like field1=value up top (not via getmethod)?
<13> function calendar() { if (func_num_args() == 0) self::calendar_init(); else { list($month,$year) = func_get_args(); self::calendar_init2($month,$year); }
<13> Mr_X: Up top where?
<16> in the url
<13> That *is* GET method
<16> i want to make a form that submits to a second page that utilizes the info via get
<16> i know
<17> use two forms :-p
<16> but the submit button i want to remove
<17> use a js to submit both :-p
<16> i suppose i could use a second page to procces s and relocate
<13> You're not making sense.
<17> indeed
<16> yeah its more like im thinking out loud so i probably dont make sense
<18> ive got this http://phpfi.com/102631 , i want to nest all this code into the $anstext , can i do that, as using " desnt work, it takes the next open and " and ***umes its the close of my first " , any ideas ?
<16> thanks anyways i think ive got my own answer, yall have a good one
<13> escape your quotes
<13> eg. echo "Hello \"world\"!";
<19> evenin peeps
<19> oops
<18> Pollita so in effect, have a \ infront of all my quotes which are nested in my "main" quotes ?
<20> Vyker, to "escape"
<20> why not use single quotes
<18> [or i have single quotes in there too.
<20> unelss you *need* double quotes, single is better
<20> faster
<20> also heredoc is useful



<13> http://php.net/language.types.string
<18> thank you, ill get reading, although php.net/heredoc seems to take me to the same place, thanks again
<13> yeah, heredoc is a shortcut to that
<18> Pollita if i use the <<<EOD does the number of <'s signify how many lines below?
<13> No
<13> <<< is just a delimiter that says "heredoc ahead"
<18> ok thanks, do i specifically need to use the letters EOD ?
<13> Your script stays in "heredoc mode" until it finds the string ending delimiter (in this case the letters EOD
<13> No, you can choose any tag
<20> I use <<<ERE
<13> EOD is just common practice as it may be expanded to mean "End of Data"
<18> thank you, and i ***ume once i have it set, i can eval() that $var ?
<13> um...yeah...but...
<20> but that's just for my syntax highlighting, it only allows one, but you can use anything you like
<13> !+eval
<21> If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP
<20> where to end... ERE;
<18> why is eval() not a good idea?
<18> here is my code this far. http://phpfi.com/102634
<13> Because it's usually used wrong, and if you think you NEED it, then you probably don't know how to use it safely
<7> !+GO
<21> [GO] Gross Overgeneralization. Everything that we tell you in ##PHP is what we consider "best practices". Of course, only YOU know your own requirements, so you may feel you need to do something we told you not to. Just don't say we didn't warn you.
<13> Heh
<22> anyone who might've read Romeo and Juliet - does anyone know of certain symbols in the play? I've got the poison down as symbolising death and ending and a few other things..
<7> :)
<13> That won't even do what you think it'll do
<23> how can i tell php if a single result is returning more than 0, to continue with the if statement? (I don't want to use mysql_fetch here)
<18> how i have used it in http://phpfi.com/102634 would, in your opinion, it be safe ?
<13> Fushing: mysql_num_rows()
<23> no, that won't do what i want, that will count the rows :/
<13> Vyker: Forget about safe, what you have won't even function
<23> or wait...nono, that will perfectly work :)
<23> doh, why didn't i think of it
<7> Pollita: Too bad you're not here. I have PF Chang's certificates that expire tonight.
<13> PF Chang's really doesn't do it for me
<7> Yeah, but it's free
<7> And I'm not sure how I'm going to use $80 of certs by myself
<23> no, mysql_num_rows will not work :/
<23> i would have to go non-oop in that case
<7> Fushuing: What?
<24> hi there
<24> http://pastebin.com/558797
<24> this is my little delete script
<24> now what it does is shows all the objects
<23> damn vBulletin with it's OOP styled scripting
<23> screw it, im going old fashioned
<24> but what i want is to make it only show the active one
<13> fessorChaos (Connection timed out)
<24> how would i go about to make it only display the one blog post i am in?
<18> Pollita is there any chance you could possibly piont me in the right direction to solving my coding problem?
<24> anyone?
<13> $anstext = '<?xml version="1.0" ?><answers>'; for($i=1;isset($_POST['question'.$i]);$i++]) { $anstext .= "<question number='$i'>"; foreach($_POST['question'.$i] as $value) { $anstext .= '<result>' . htmlentities($value) . '</result>'; } $anstext .= '</question>'; } $anstext .= '</answers>';
<24> please help me out?
<13> That replaces lines 8 through 35
<24> i am very new to php
<25> you can use xml with php?
<13> drew: Very much so, yes
<24> Pollita: could you look at my script and see if you could help me out please.
<13> If you promise to be a little less needy
<25> im not even sure what xml really is, i mean ive seen all the custom tags on xml pages and everything, but im gonna go google it up and see how it all works
<24> Pollita: ok
<13> drew: It's nothing more than a data encoding format
<13> Don't let the buzzwords and the hype fool you
<18> Pollita, thank you kindly.
<13> awwa: The first thing you need to do is sanitize your user input. Using $_GET['delete'] directly in a SQL statement is just asking for trouble.
<25> is its functionality similar to something like that of http://smarty.php.net
<24> Pollita: how do you mean?
<20> awwa, ***ume it is malicious
<24> what is?
<20> anything a user might do
<24> well its for my girlfriend, but i see you point
<20> then especially so!
<24> i will look in to that when i have it working
<13> awwa: http://pastebin.com/558808 <--- Fixes your SQL injection


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#suse
CAPCItator
linux script to run at startup
#css
Build of the package nvidia-kernel-source failed! How do you wish to proceed?
#egghelp
adm5120 gpio driver
updfstab.conf on debian
gentoo locale charset LC_*
Fatal error: Call to undefined function mysql_pconnect() in /usr/share/php/adodb



Home  |  disclaimer  |  contact  |  submit quotes