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



Comments:

<0> Sysop_Kn1F3 explode
<1> Well then, you'll need to get the lines into an array.
<1> Use explode
<2> humm
<0> Sysop_Kn1F3 And call me 'dude' agian, and I'll ban ya.
<3> CraZyLeGs: it's a problem. threads are very very difficult to present nicely.
<2> wow
<4> present nicely ?
<3> CraZyLeGs: yeah
<4> the issue right now is collapsing
<5> $prefix = "\nSomestring"; $str = $prefix.implode($prefix,explode("\n", $str));
<5> Jymmm: that's right dude
<3> CraZyLeGs: okay. so what's the problem?
<5> Jymmm: you do that again, and I'll take it right to the top
<0> caffinated Hey, you asked for it.
<3> i thought caffinated was asking to be banned? ;p



<4> right now I do know what are the nodes that should be displayed, those whos parentid = 0 (the roots ) and the children of the incestors of the current node, and the children of the current node
<5> deadroot: I'm a chanop here
<4> I feel to actually write the code
<4> it's a mess in my head
<3> caffinated: ^^'
<4> *I don't feel
<3> CraZyLeGs: you could keep track of which nodes to display or hide in a global variable
<5> if it's just a tree, and you're just trying to hide nodes, use javascript.
<5> there is no point to using php for that.
<2> good.. now I have something like this: $result[1] have: "This is a big phrase". How do I get the first word? is it possible?
<2> or I need to spli in " " and get the [0]
<2> *explode
<3> /\S+/
<3> /^\S+/
<5> Sysop_Kn1F3: strpos and substr would be the optimal way.
<3> is it?
<6> Night
<5> yes.
<2> deadroot suggestions
<2> ?
<2> caffinated I can't use strpos because I don't know what the user will type
<2> so I don't have the string to get it's position
<5> Sysop_Kn1F3: you're looking for the first space
<5> deadroot: wrong.
<2> the work before the first space
<2> humm
<2> ok Understand
<2> :D
<3> caffinated: i checked with getmicrotime()
<5> Sysop_Kn1F3: right, but once you have the first space position, you know what part to substr.
<5> deadroot: that doesn't stop you from being wrong.
<2> yeah.. I got.. thanks very much
<3> wrong in what manner?
<5> in the manner that those functions are optimized for those specific purposes. regex is not.
<5> there is also the point that regex is less readable, and leads to confusion.
<3> caffinated: if regex does the job faster than the equivalent string functions, i wouldn't call regex sub-optimal
<5> not to mention, your regex wouldn't work properly for what he wanted anyway.
<3> but i'll give on the readability
<3> and i'm not going to defend regex i wrote that i didn't test :)
<5> that's good, because it would fail.
<2> caffinated well now I have the posision of my first word ($position_of_space-1) how do I get the string?
<5> Sysop_Kn1F3: substr()
<2> substr("abcdef", 0);
<2> ?
<3> Sysop_Kn1F3: www.php.net/substr
<3> read
<5> http://php.net/substr
<7> Why don't header("Location: ") work on all webservers?
<5> rtsq: webservers don't deal with headers. browser do.
<3> you probably did something wrong
<8> rtsq: BECAUSE YOU FORGOT HEADER("STATUS: 302")... READ THE MANUAL NEXT TIME
<3> r00t: i think status: 302 won't work
<5> I don't ever remember having to do that to make a redirect work.
<8> sadly some retared browsers break the http protocol and use Location: even with no status set
<8> because IE ****s, that's why
<3> r00t: status isn't important
<8> deadroot: status is the most important part of a http reply
<3> r00t: _no_
<8> Y-E-S
<8> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html



<3> HTTP status is important. but the header('Status: 302') isn't necessary
<8> you mean php does it automatically?
<2> how do I print an array?
<8> i have seen WAY too much php powered sites that send Location with 200
<8> Sysop_Kn1F3: print_r
<2> thanks
<3> header('Location: http://asdfa') is sufficient
<8> deadroot: ONLY if php automatically sets the status, which at least SOME version does not
<3> and when i checked the usage of header('Status: xxx'), i don't recall seeing them work. :/
<5> r00t: I've never sent a 302 with a location header, and it has never failed.
<3> caffinated: huh?
<8> all i say is: on http level, a 3xx status is REQUIRED, just a Location: header is wrong/broken
<0> the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless some 3xx status code has already been set.
<8> Jymmm: as i said, i've seen a broken php app (bytemonsoon) that manages to send 200 replies with Redirect
<8> actually that might answer rtsq's question, if it depends on the php version
<3> shouldn't they patch the php then instead of fixing the script?
<8> it's not WRONG to set the status manually... but they might want to, yes
<3> thanks. i'll keep that in mind
<9> deadroot not everyone hosts a php site on their own machine
<9> so people cant "just" patch php
<5> if you're paying for the service, you can demand it.
<9> not at all
<3> still, the responsibility should lie with the server administrators. if they're not going to patch the server, i'd look elsewhere
<9> if you're paying for a webhost with php3
<9> you get php3
<5> if they don't want to keep php up to date, there are hundreds, if not thousands of other places that will gladly take your business.
<8> you can demand whatever you want, the question is if you GET it
<2> how do I know the lenght of a phrase?
<8> Sysop_Kn1F3: php.net/strlen
<5> if you're stupid enough to stay with a host that won't move with the times, then it's your own fault.
<2> ok thalks
<8> luu: did you make up that php3 part, or do you know it?
<1> Heh, PHP3 hosts, that's so retarded.
<10> wait
<10> php3?
<10> that still exists?
<3> i think there are still server running around with that
<1> There's tons, still.
<3> dammit, i need a mouse
<11> Under IIS, I can't seem to get php5 to see multiple php.ini in multiple doc_roots, php4 works fine. I installed manually, not using installation.
<11> anyone know how to fix it?
<11> I installed php4 and 5 both the same way
<3> yeah, i know of one website that says it's using php3
<11> deadroot hack it... :P
<3> no thanks. i like those people
<11> joke
<3> :p
<11> your 'p' is different than mine
<9> r00t there are still hosts out there that offer php3
<11> i can't seem to copy your 'p'
<3> webavant: yeah. i express differently :p
<8> luu: i mean if it's really php3 that does not automatically set the status to 302 when you set Location:
<9> oh, I dont know about that
<9> never checked
<3> bastard :p
<11> anyone run PHP under IIS?
<5> not i. we have a total of one windows server at work, and it's exchange.
<1> I wonder sometimes.
<11> Under IIS, I can't seem to get php5 to see multiple php.ini in multiple doc_roots, php4 works fine. I installed manually, not using installation.
<1> If people have access to use PHP, might as well have access to use Apache or something more friendly with PHP.
<1> webavant: Don't repeat yourself.
<3> unless you also have asp stuff on the same server
<1> We heard you the first time.
<11> I already have so much software on this production server that adding Apache would just be silly
<5> yes, most don't use IIS by choice. or at least, that's my experience with people and IIS.
<11> kuja i'm sorry, I'm desparate
<11> kuja it's a problem I've been dwelling on for months
<1> You being desperate doesn't change the chances of someone knowing the solution.
<2> how do I instruct php to show < ad > not as html codes.. but as text?
<5> Sysop_Kn1F3: htmlentities()
<3> Sysop_Kn1F3: use &gt; and &lt;
<11> maybe the chances that someone not reading their backlogs might see my redundancy
<11> *redundance


Name:

Comments:

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






Return to #php
or
Go to some related logs:

fiberchunks
svgalib pasting doesn not give a valid preprocessing token
#linux
#lisp
postfix/cleanup fatal: unsupported dictionary type: pcre
suse setup RAID yasthow to
syntax of mysql_fetch_rows
#php
#python
any2dvd usage



Home  |  disclaimer  |  contact  |  submit quotes