| |
| |
| |
|
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
Comments:
<0> <?php <0> $ip=@$REMOTE_ADDR; <0> echo "<font face='Verdana' size='3'><b>IP Address= $ip</b>"; <0> ?> <0> for some reason it doesn't show $ip <1> no takers for me eh? :\ <0> lol, none for me either <2> aidan : i use __FILE__ if i use it in http://localhost/ i get the name of the script. if script is in a directory i get Error : 500 <3> $_SERVER['REMOTE_ADDR'] <0> mrkris_ - that isn't working, either =( <2> aidan : $_SERVER['PHP_SELF'] , $_SERVER['SCRIPT_URI'] all give the same error <4> 40,CobaltBlue;10,White;20,Almond <4> I'd like an efficient way to turn the above into an array that's like this: $arr['40']='CobaltBlue' <4> $arr['10']='white', ec <5> nick|away: they are variables, they don't give errors .. what are you talking about?
<6> !+arrays <7> [ARRAYS] Please read http://php.net/manual/en/language.types.array.php for a basic understanding of how arrays work in PHP, as well as http://php.net/array for functions to manipulate arrays. Be sure to read 'user comments' as well. <4> Jymmm, I know I can explode based on ";", then in a while look, explode on ",", and build an array in a loop, but I was hoping for a better way. <4> s/look/loop <1> hmm <1> including slows down a lot <1> 0.0005 including one file; 0.0012 including three all-together. <8> What is the function that sounds like gethttpcontents that will load the contents of a url into a variable... I forget its name <9> jiggster - how exactly does that slow anything down? :P <1> i dont like the fact that including bogs down <1> it's just... it seems like it should make such a big impact :P <9> bogs down what? :P if you were a C++ programmer id understand your comment - but php? <9> php is inheriently a slow language lol <10> anyone know of a way to test if there is data pending on a socket? If I try to check @socket_recvfrom, it locks the program on that line until some data comes in. <11> dampjam: file_get_contents(), and it's not specific to http <11> socket_select() <11> Or just set it non-blocking and deal with it returning no data <9> is recvfrom a blocking call? <9> id guess so <11> m-ookie: It is if the socket is blocking <1> it maybe a "slow" language, but that doesnt mean you should make it even more so :\ <10> Pollita: it's perfectly fine if it doesn;t return any data... how do I set it to non-blocking? <9> jiggster - c'mon get off that already ;P nobody on earth is going to notice a hundredths of a second lapse <11> See that list of socket_*() function on the socket_recvfrom() manual page? <11> Which one do you think will do it? <1> unless i'm timing it and i see the difference echo'd out <1> anywho i'm over it, so enough said <10> oh hey look at that! <10> sweet! God I've been banging my head around this problem for two days <9> Shdwdrgn - yeah, that can be a pain if you're not familar with socket programming :) <5> jiggster: include uses a bunch of stat calls, obviously it depends on your disk access speed, but it's usually quite slow <1> rawr <10> not at all... this is the first time I've tackled it <1> time for scsi <1> lol <1> require_once is no different then except that php reports failure on it differently <1> hrm <9> jiggster - im not sure i'd bother with scsi :) either go solid state, or wait for IBM's holographic storage to lower in cost enough to hit mainstream :) <1> well i was joking, i can' even afford scsi, because i'm not serious enough about computers to implement it myself <1> it's been 7 years, my glossy eyed dream of server administration and management is long gone <9> what do you do? <5> I've moved several gig of content around in the last month on our box. I haven't bothered redirecting the stuff, as it was mostly old content... unfortunately I'm getting thousands of 404's an hour... I'm pondering which is the better option: <1> well i dabble with a lot, but not as an employed person <5> a) their links are un-mapable, so redirect them to base folder of the new content <5> or, b) redirect them to a info page, which then redirects them to the base folder of the new content <1> people like to know whats going on <9> doesnt really answer my question as to what you currently do, jiggster ;) <5> that's what I figured <1> m-00kie: nothing <9> unemployed? <1> i'd opt for b aidan <1> m-00kie: yes <5> okay <1> well -c3 or -c1 didnt do anything <9> try -d1 -X sdma1 <1> what the heck is sdma1 <9> or udma1 whichever <1> oh :P
<9> DMA mode <1> yeah yeah, lol <1> lowercase + 1 confused me <1> hmm <1> well I'll man hdparm before i blindly do it :P <9> :) <1> i concur <12> I'm about to start a big project alone that is going to have a lot of forms and a lot of database interaction. What do you suggest? I hear PHP isn't well suited for big projects. <1> hmm **** i closed the term and cant remember what my old -tT benchmarks were <11> I suggest using the languge you're most comfortable with <12> sorry, I mean, what do you suggest I use to reduce the amount of work. Like which framework. <11> Well, if you can wait, Zend is coming out with a framework <1> udma killed buffered reads nicely <9> again that probably also depends on the language you're comfortable with ;) <12> I have 3 years PHP experience, but all my past projects have been started by other people. Now I'm starting something more or less new. <9> doesnt matter <13> is there a way to go through a string and replace a string like, say, ((link)), with, say, <a href>? <9> are you comfy with the lingo? knowledgable in it? <11> Mewshi: str_replace() <12> m-00kie: yeah <13> ah... ok ^-^ thanks ^-^ <9> then stop asking stupid questions and get to work! time is money! work work work <9> :) <12> coding fast without a real design is going to get me nowhere fast <13> was that at me O-o <11> Start designing then <11> Mewshi: no <12> I guess I need to do some more reseach then. <14> if you code with objects, UML cl*** diagrams is a good place to start <14> that you can do before deciding on a language <12> I have no choice about the language. I have to use PHP because when I finish the project and leave in 6 months, everyone else in my department already knows PHP and they'll be the ones to have to make changes to it. <14> then whether it's well-suited or not is a moot point ;) <9> good way to force them to learn a new language ;) <9> i know quite a few languages - i dont see why a department should rely on a single language for everything - its rarely best.. <12> I've picked up abandonded projects from other people before, and cursed them for their poor style and planning. <9> but hey :) not my problem lol <12> haha, I don't think my boss would like if I made other people learn a new language just to maintain my code. <14> m-OOkie, it's called unreasonable management <9> khrome - que? <9> me making em learn a new language, or their inadequacy in programming taste? :) <14> like a boss not being willing to invest in employee education <9> ah <9> yeah <9> unfortunately some companies (especially large ones) have an internal "standards" policy when it comes to design - especially of their webpages. <9> its both good and bad <12> I work for a university and that's unofficially what we have <9> universities should be more flexible.. they're supposed to be the testbed of the industry :) <9> i came across an interesting company last year <9> that implemented their own ASP stuff - except it was in C++.. they called it CSP <9> very nice - i loved it. only problem was their apache module only worked on windows platforms :( <9> wonder if they've added linux support yet. <9> hmm nope. <9> http://www.micronovae.com/default_csp.html <15> Hi. I'm getting a lot of notices like: "Use of undefined constant name - ***umed 'name'" in the output. It's the result of this kind of thing: <15> return array('begins'=>$shift_begins, 'ends'=>$shift_ends); <15> I know that you can change the reporting level <9> i bet that if large companies started to use that, they'd make a linux module :) <15> But what I want to know is what part of that little snippit of code raises a condition that php would want to report on. <16> Is there a way to get around validation when using sessions? It complains about the session ID being in the links. <9> uru - hmm looks fine to me <9> whats $shift_begins / ends contain? <15> a timestamp <15> integer <11> uru: That error doesn't correspond to that line. <11> uru: Please paste a matching set <15> array('name'=>'Morning', 'begins'=>'6:00am', 'ends'=>'3:00pm'), <14> m-00kie, those guys aren't well informed... <9> i think he means paste a bigger chunk of code at pastebin.. <14> "The ability of making direct system calls, allows the development of advanced web applications that are impossible with ASP and JSP" <14> is not true <9> ? <11> uru: Most likely you have an errant ' hiding somewhere that it shouldn't be. <14> JSP can access external binaries through JNI <5> is there a neat way to strip all the numbers from a string? 'fo23ffs2' and I want 232
Return to
#php or Go to some related
logs:
pygtk+unicodedecodeerror #perl php page is a class networkinstall ubuntu #perl #web kunbuntu GRUB wchan write_chan #kde #bash
|
|