| |
| |
| |
|
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 29 30 31 32 33 34
Comments:
<0> the script i have <0> is php lol <0> not java <1> lol <2> !tell saksase about enter <2> saksase: javascript != java <3> CryWolf: yes ... I've tried ... it changes locale but not time. Also the setlocale works on a per process basis, not per thread ... so it would be very much inferior to what I'd need ... <0> like when a person selects a form after, it goes through the php <2> saksase: perhaps you should clarify what you're trying to do, then <0> i just want to display the first option as soon as the page loads <0> i'll show u <0> http://evon.be/news.php <2> !tell saksase about u <0> you see, i would like for that to just show the first option right away then allow them to select all others <2> saksase: I see only a drop-down box and a button. <0> yeah
<0> once you hit the button, it displays the content <2> ok, with you so far. <0> i would like for it to automatically display the first (toronto star) without hitting the button <2> saksase: so do it. <0> :| i don't know how <0> i tried <2> set a default value which corresponds to the first article. <0> let me try that <0> erm lol i don't get it :| <4> re <2> saksase: somehow or other, your script knows which article to display after you click View, right? <0> http://pastebin.com/637090 theres the code <2> saksase: which lines in specific are the problem here? <0> i don't understand php very well <0> well i don't know, there is no problem really... <2> saksase: this isn't a php problem. it's a programming problem. <0> it's just i wanted to do that and don't know how <2> it's a basic logic problem. <0> could you help me with it please? <5> a <2> saksase: I have. I've told you waht to do. <0> i don't understand it really <2> then it's beyond what I can do for you. <2> saksase: how did you write that without really understanding php? <0> i didn't... thats the thing <2> oh, then contact the author. <0> which i don't know, that script must be 5 years old lol <2> probably explains why it looks so horrid. <0> lol <0> i like it though <0> i just want to modify that <2> then learn php and modify it to however you want. <0> :| <2> however, unless you can ask a specific programming question, there's nothing I can do for you. <2> you can start at php.net/tutorial <0> erm <6> hey lets play a game. someone say a random noun. any random noun. first person to say a good one wins. go. <2> tobmoox: wrong channel. <7> what's better to use? mysql_fetch_array() or mysql_fetch_object() <2> dimitri2: do you want an array or an object? <7> whats the diff between array and ***oc with fetching? <2> array includes numeric and ***ociative, giving you twice the array. <8> dimitri2: difference is between an ***ociative array and a numerically indexed array <2> I never use anything other than ***oc. <7> i use fetch_array and can still use $row['name'] $row['ID'] <9> anyone using the php-java bridge? <10> hey fellas <10> anyone ever had experience with uploading a 500mb+ file via FTP with PHP <10> using the FTP functions <10> i've been trying to get it working, but i get consistent timeouts <10> i know, it's stupid ... i'm just curious if anyone has done such things <9> ^Artnez: you might have better luck with curl instead of a built-in lib <10> or could recommend something descent (aside from using PHP from command line) <10> well the problem is really the timeouts <10> apache times out after 300 seconds <9> oh <11> um... ftp client??? <9> that's easy <10> but i dont want the user to sit there waiting for it to upload
<9> you can change the timeout both in apache and the php script <9> to 0 <11> ^Artnez: IF you have clients with 500MB uploads, they sure as hell should know how to use ftp <10> you're ***uming that i dont know how to use an FTP client .. why? <2> ^Artnez: somehow use javascript to check the connection speed, and upload directly if the user is on a T3, or pop up a message saying to use an ftp client if they're on dialup. <10> it's not the kind of project <11> ^Artnez: READ MY LIPS... I said you clients, not you. <10> Jymmm: that's great .. thanks for the help <11> !+pafy <12> [P***ive Agressive Fsck You] We aint buying your crap, so knock it off! <9> ^Artnez: are you trying to make a yousendit.com type of thing? <10> Deu***: Actually know, what they want is a single file FTP'd to multiple other servers at once <10> IE: you upload it once, and the rest is done by the serv <11> rsnyc <11> rsync <9> oh, well disable apache timeout, upload, and use multi-curl to upload simultaneously <2> ^Artnez: stick the file in a queue directory, and have a cron job do the rest. <10> would PHP in command line be a bad idea? <10> just call it via cron <11> Use the right tool(s) for the job, PHP just isn't it. <9> it's only a bad idea if it doesn't do what you want it to do <13> you could use http <10> Jymmm: what the hell is wrong with you? i'm not asking for the tool to use.. i know all about rsync and use it frequently. stop being an elitist jerk. <14> i have a bugged counter in a wiki program i am running -- i know the line that is messing things up -- can anyone help me with a little code fixing <10> Deu***: thanks for the advice <11> ^Artnez ya just pissed off the wrong person... <14> for ($i = 0; $i < count($ins_fields["data"])+10; $i++) { <9> ^Artnez: curl_multi works great, very solid bindings in php5 <14> i have this for loop that inserts data into a database <14> but it is cutting off the inserts prematurely <14> i need to know how to fix it to give the right count <2> rosenjon: post the line to pastebin <14> k <2> and preferably a few lines before and after it. <9> rosenjon: yeah, because you have +10 there <14> where is pastebin for this channel <14> i did that on purpose deus <2> !tell rosenjon about pastebin <14> that is how figured out it is bugged <14> that isnt normally in code <15> *^Artnez* i really dont care about the ban, just wanted to let you know that just because you have Op status doesnt mean you can be an ***hole <14> got more output when i upped the counter value artificially :) <15> ^Artnez You got rude... you ****ed up. Quit bitching about it. <9> internet.serious.business.jpg <14> http://php.pastebin.com/637118 <14> i doesnt look like it pasted all that clean -- but the first line is clear, and that is where teh bug is <14> i didnt paste any of the things before, because they aren't important <2> rosenjon: now, what exactly is the bug? <14> line 1 in pastebin <2> eep...that was a bit more than I was hoping to see <9> right, what about line 1? <2> rosenjon: yes, but what is the bug? <14> the counter value controls how many times the loop goes through and adds a value to the db <9> (besides your +10) <14> hehe <14> i was finding that certain values weren't getting entered into the db <2> and using count() as part of the condition in a for loop isn't good practice. ***ign it to a variable right before the for loop. <14> please explain <14> am fairly new to this -- so excuse my ignorance <9> because the value could change, or there's a delay to check count(array) each loop <2> rosenjon: instead of calling a function on every iteration, just check a variable instead. <2> and if the count could change, you're doing something wrong. <14> so $counter=0? <9> no <14> right before the for loop <2> $num_fields = count($ins_fields); or something like that. <9> $arrayCount = count($ins_fields["data"]); <9> i < $arrayCount <14> ok let me try that out <9> that's not going to fix your problem <2> Since the number of fields will not change inside the loop. If it does, that's a bug. <9> rosenjon: right after the first line, put this: <14> this program sets privileges -- so certain people can see and edit more fields than other <14> s
Return to
#php or Go to some related
logs:
#mysql fedora d945gntl #php #sdl eggdrop 1.6.18 apt-get diable livna dhclient insufficient parameters #suse opengl flightgear fc5 FW_SERVICES_ACCEPT_EXT
|
|