| |
| |
| |
|
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> $arr = array(); <1> Is if !(isset($var)) a valid statement/ <2> I am reading lines from a file, and I want to push each line onto an array and I think it needs to already exist <0> yes <1> Stormchaser, Was that to me? <0> use file() <0> Nexus: yes <2> Cool. It worked. <2> Thanks guys <0> slake: You want to use file() <1> Stormchaser, Hmm... It's complaining about my ! for some reason. <3> if ( !isset() ) <0> hm, yes... If(!...)... <1> Ahh... <1> Good eyes FlamingCows <4> itrebal: $20 and I'll send ya this phone plus two other cordless ones (incl shipping)
<5> can eregi validate a pattern like xx/xx/xxxx <6> Use pcre <6> ereg is deprecated <6> http://php.net/pcre <5> ok if i have too :) <6> You don't have to, but it's better <6> ereg will be removed from future versions of PHP <6> So just stop using it. <5> not too fimiliar with pcre <2> What is a good way to generate random names <5> nforbes: so i need to match that, so would i do preg_match <6> Yep <7> gesh finally <1> Does IE really not do <a><input type=submit></a>? <5> lol <4> Nexus tias <1> tias? <0> close to POSIX regex <4> !+tias <8> [TIAS] Try It And See. If you want to know if something works, try it first. <1> Ahh. Yea, I did try it first. Works peachy in firefox, but IE isn't responding. I just wanted to make sure it really doesn't work and it's not just my bad code. :) <4> Nexus ask in #web, they should know. <5> i can still use [[:digit:]]? or can i use \d? or does it matter? <5> with preg_match <0> use \d <5> stormchaser: am i correct that i can escape that at any time <9> mrturtle, ? <2> Is php like Perl in that I use an operator other than == for string comparisons? <3> No. <0> Well... It's not like \d is Alcatraz <2> I am reading a directory, and this is always true: if($line != "." || $line != "..") <5> lol <6> eq eq eq <2> ooooh wait <6> eq eq eq <6> eq eq eq eq eq <6> That was a song, by the way. <5> stormchaser: just want to make sure i can do like preg_match("/^(\d [6513])$/",......) <3> Yup. <4> Orphen972 fix your client please <10> ok <4> FlamingCows I have 3 spare FDD's... You dont want to jsut toss em out, but you dont want to ahve to buy one either. <3> Heh, I know what you mean, I don't have any at the moment and I'm running into incidents where I regret it. <3> But they are only $5 if you really need one. <3> Anyway, you could send me one. :) <4> FlamingCows lol <0> who needs FDD's nowadays? <5> gay windows <5> in some occasions <3> I do, apparently. Some of my more luddite-esque professors still use 'em. <4> flashing firmware <5> yep flashing firmware <11> We have a stack of them at work, I still haven't found many uses for them, other than entertainment during moments of boredom. <0> Well... I have a FDD in my lappy as well :) <3> dustmite: Steal one and send it to me. <3> :) <11> Although the serial mice are proving excellent entertainment, so many things you can do with them. <6> Stormchaser: All my non-laptops have floppy drives <12> anyone know of some nicely written newbie tutorials for someone starting to learn PHP from scratch? (official manual seems a bit complex at the moment)
<11> Especially my colleagues excellent idea to just swap the serial cable for a ps2 one... nay pretty. <4> all my laptops have fdd now tha tI think about it. <4> all and serial and parallel ports too <4> and I use em both <11> We got an excellent call about one of the Dr Slaughtered mice that it was, apparently, getting very warm... True to their word, it actually was getting too hot to touch. Shame, we could have burnt a student with it. <13> hello <13> how to put a time limit during a get_file_contents ? <13> set_time_limit(2); $r=@file_get_contents("http://..."); does not seem to work <14> Does anyone here use the Pear:HTML_* family of cl***es? Any opinions on their general usefulness and code quality? <15> Jymmmm: Have you put on weight? <16> does anyone know a way to 'trace' what exactly is doing my browser in a specific moment? for example, i would like to know, how 'POST' link looks like on some page. but i have no idea how to trace it. theoretically i could install some sniffer on my host, but maybe there is an easier way... ? <17> juice`, print_r($_POST) ? <16> i don't have access to this page :) this is not really PHP specific question, but there is no browsers-generic channel :) <16> i see some page on the internet, when i click on some button my brower posts something <0> juice`: GEt livehttpheaders <16> i want to see how exactly does it look like <16> hmm <16> browsing for it, thanks <13> no one knows for this time limit problem ? <18> it's not one you can solve with php to be honest <0> don't sel time_limit to 2 seconds <18> you can't set time limits for blocks of code in userland, you'd have to cheat somehow <0> that no, but you *can* set the time_limit in the beginning of the script <1> Ok. I'm using debian with exim4, and trying to use mail(). It's not sending mail for some reason. The apache error log says nothing. Any clues on how I'd start debugging this? <0> join #exim <18> yep, send your mail using mail(), then tail /var/log/exim_mainlog and see if it turns up there <18> if you've got a busy box, do it quickly ;) <18> :) <1> It's not busy at all, but I'm getting nothing from the exim logs either... <0> !+g8 <8> Guideline #8) SQL Q's: #sql, #mysql or #postgresql. Apache Q's: #apache. Linux Q's: Either #yourdistro, #linuxhelp or #linpeople. HTML/CSS/JavaScript Q's: #web. Just because some other channel is 'dead' does NOT mean you can ask here. <1> So what you're saying is it's a mail client configuration issue, not a php config issue... <0> indeed so. <1> Other than giving php.ini the path to sendmail, there isn't any other config for php, right? <18> I'd check the folder you're running the script in to see if an error_log has been put in there <0> right. <9> mrturtle, ? <13> Stormchaser: I did not understand what you said <13> can I or can't I limit the time <2> How do I tell if a file exists? <19> hi <18> if (file_exists("filename")) { } <20> slake: if (file_exists("file")) <20> ah, beaten. <19> how can i reorder the indexes of an array <18> any particular order? alphabetical? <2> Is there a way to prevent a var from being overwriten by extract()? <19> hmm like 1 2 3 4 <2> how do I make something constant? <0> Reorder? In what way? <21> slake: Easy. Don't use extract() at all, as it's a kludge. <18> he means something like ksort <19> Tomize: at the moment it looks like this <19> so i want the missing 5 skip <22> slake: define('MY_CONSTANT', 1234); <21> coca_: $new_array = array_values($old_array); <19> TML: ohh thx ill try <18> based on everything you've said, try ksort($yourarray, SORT_NUMERIC); print_r($yourarray); <21> coca_: Although, if a missing key has any real effect on your code, you have bigger problems. Use logical iteration like foreach() instead of explicit iteration like for() <19> TML: ok actually i want to write the content of the array to a file <13> how to put a time limit during a get_file_contents ? set_time_limit(2); $r=@file_get_contents("http://..."); does not seem to work <0> fwrite($fp, implode($arr)); <0> Er... Forgot another switch <0> !+func implode <8> string implode([string glue,] array pieces): Joins array elements placing glue string between items and return one string <18> if you care about array keys and you're only using PHP, you might want to try serialize instead of implode <21> coca_: That also sounds to me like a bad approach somewhere along the way, but all I'm saying is that it's trivial to write code that doesn't care about "missing" keys. <22> coca_: For later use in PHP? <19> TML: why bad approach ? <19> joh: no i get it from a file write it into an array erase one entry and write it back <0> coca_: Errors and warninggs may sneak in. <22> coca_: ok, nvm. Listen to TML and Stormchaser then ;) <19> Stormchaser: when doing such things with arrays <0> no, when doing the for() voodoo..
Return to
#php or Go to some related
logs:
#linux #linux munge.socket #php #css gentoo hangs at coldplugging pci devices #javascript #linux #php imagerotate ubuntu
|
|