| |
| |
| |
|
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
Comments:
<0> Ah sorry, I can't read. My Bad <1> but as a said, you're limited to know _exactly_ what row/field you want <2> :OOOO WTF <2> HOW many ppl :)) <2> hello * <3> ^Artnez, not a value that a field contains? <3> if I want the row that contains a field with a certain value... <4> when I use file_get_contents(), is it a stream, or how can I access the individual lines like you suggested stestagg ? <1> callipygous: now that's different <3> do I need to do another sql query? <1> callipygous: why run "another".. change your previous one... <3> no, my previous one is still used <1> callipygous: then run another query <0> regress: why not use file? this reads the file into an array, one element for each line. either that or explode("\n",$text); tho you would have to remove stray \r chars if you're in windows <3> so id either need another sql query, or hopefuly a way to get to the row
<3> dang, ok <1> callipygous: or another way of doing is to sort with a callback <5> stestagg: Or just explode on \r\n <1> i think it's usort(), ksort() or something <3> geez no idea what that is, i'll sook it up <0> TML: ***uming the file uses windows line endings <1> but i think that's going to be wasted script execution time :) <5> stestagg: You suggested trimming \r's. I suggested just calling explode() with the correct parameter. <6> Well, <dbref>_fetch_array(<link arg>, <IDENTIFIER CONSTANT>) <0> callipygous: MySQL is optimised for that sort of data filtering. let it do the work <1> stestagg: regex would help in that case <1> regress: http://php.net/preg_split <1> if you even need that... <7> Use preg_split() <7> Meh, someone is faster than me. <7> Well, I'm just not maying too much attention. <0> ^Artnez: is that faster than an str_replace and explode ?? <3> okay <7> paying, even. BLAH <3> thanks for the advice <1> cant keep up kuja? i think its the ruby seeping to your brain cells :) <8> this is for the zend users in here - zend has autocompletion of functions right? Is it possible to add other libraries to zend for autocompletion? <1> stestagg: damn right it isnt, however if he doesnt know what line endings he has... <7> ^Artnez: :) <7> stedios: What are you doing? <7> Are you trying to split a file? If so, use file() <0> ^Artnez: Hence why I suggest trimming the \r s and then exploding on \n s. <4> ^Artnez: it's windows line endings <4> so just use file_get_contents, then explode on \r\n? <0> regress: why not just use file(), it'll be the best solution <4> hmm <4> fopen? <0> regress: no, file(), from the manual: file -- Reads entire file into an array <4> alright <1> stestagg: i guess your right. then again an str_replace() i slower than preg... <1> and maybe one line COULD be faster than those 2 lines <0> also, the TRIM function will strip any odd characters from the lines <1> but i wont say which because i dont know <9> simple PHP scripts run fine, but I cant seem to determine why multifuction scripts just arent processing output <0> Silivrenion: Have you looked at your php.ini. to see what error reporting level you are at? <9> its E_ALL <9> however theres not even errors output.. <9> it just sits there and doesnt process some things <8> E_ALL & E_NOTICE? <9> i've noticed this happen with PHProxy and my contact form so far, both of which worked fine on my other system <9> no <9> error_reporting = E_ALL <9> should I make it say & E_NOTICE ? <4> here goes <10> is there an easy way to add a lot of text to a variabile? <10> or do i just have to use the dot <0> Sal: define 'a lot of text'. <10> an order <10> hehehe <0> Sal: lol. I mean. what's wrong with $text="a lot of text"; <10> i hate do do $text = $text."...."; on every new line <10> what about that ;EOF stuff <11> Will someone help me out with little problem I am having? <10> wait don't remember the correct syntax <0> Sal: $text.=...
<11> I'm using file() to open a url <12> I have a php website (index.php) and phpbb forums (/phpBB2/index.php) - I have a universal login on the homepage that logs the user in to the forums but keeps them on the homepage. When the user is loged in, the place where the USER: P***: used to be now says Welcome back 'username'. I would like to also add specific statistics on the user as in the # of PMs and a link to their profile. How would I go about doing this? <4> file() has some wierd syntac <4> syntax... <0> regress: It's exactly the same as file_get_contents <4> so $result = file(myfile.txt); <4> I can access each line as $result[1] and [2]...? <0> regress: yes, you get an array <0> Sal: http://uk.php.net/manual/en/function.echo.php <10> i'm looking at that <10> hehehe <0> Sal: It's explained in the examples <0> :) <4> nvm, I was doing something stupid again... <0> Sal: what for? <1> Evo|Immortal: I might be off base here, but #php isn't for PHPBB software support <13> hello <12> Well its not really for phpbb <14> hahah. <12> Its really for php that I want to work with it.... <10> i thought i could rederict this to a var: echo <<<END <4> stestagg: that worked pretty well actually <4> so how do I cut down each series of ;;;;; <13> is there any way I can find out the files that a folder has <4> ;;;;'s to just one ; <4> stupid enter key right next to the semi-colon.... <1> Acs: are you on PHP4 or PHP5? <13> php5 <1> lucky you :) <13> lol <1> one sec i'll show ya <0> lol. while ($count) $text=str_replace(';;',';',$text); <13> why? <12> ^Artnez: I want to write code that happens to query data from the data the forums has, I highly doubt thats asking for support with phpBB at least in my oppinion... <14> What is a good way for a novice to practice/learn php? <0> regress: or use regex. <13> ^Artnez ok thanks <14> as in, like, something to try and make, as a beginner's project. <4> ha. ha. ha. <12> CHOCPFTF: A basic login script <12> CHOCPFTF: It's pretty easy once you understand and so much to do once you get the basics <14> Ok, thanks. <12> CHOCPFTF: Works with SQL database though <1> Acs: foreach( new DirectoryIterator( $path ) as $fullpath => $basepath ) { <14> It's... it's CGOCPFTF, btw. :-P <1> that will loop through the entire directory and will ***ign $fullpath and $baseapth respectively <13> cool <12> Sorry :( <1> it will display Dirs and Files, so keep that in mind <13> I just thought there was a function <13> like in win32 api you have the findfirst function <1> Acs: there isn't. to do it in PHP4 takes some more code <13> ^Artnez thanks alot I look up those functions in php.net <13> thanks for the code <15> i need a helpdesk tracker faster than I can build one... recommendation? <12> ^Artnez: Do you agree with my statement? <1> Evo|Immortal: if you dont know how to write a MySQL query in PHP, you'll need to consult a tutorial, as that is a broad topic. <12> ^Artnez: I do... <1> if you do know how to do it, then you need to consult the PHPBB support forums to see how their DB schema is drawn out <0> deekayen: search sourceforge.net for one <13> ^Artnez I looked up DirectoryIterator <13> and there doesn't seem to be a match <1> Acs, you probably wont find it. it isn't a function, it's a built in cl*** <1> i'll link you <13> there are alot of DirectoryIterator but they all have something extra <1> http://us3.php.net/manual/en/ref.spl.php <1> it's the new SPL lib for PHP <13> oohhhh ok <13> thanks <14> in my experience, working with mysql was too much of a pain-in-the-***. Thankfully, my laziness won't harm anyone since I don't run a site or anything. <1> Acs: what i showed you is sort of a shortcut <1> Acs: the proper way to do it is extend the DirectoryIterator cl*** <13> ok <13> I'll try to make sense of this
Return to
#php or Go to some related
logs:
request_module: runaway loop modprobe binfmt-464c ansic mud
#perl quicktables for slackware /usr/bin/perl: bad interpreter fc4 xorg .xession preg_replace youtube suse jengelh xen network ubuntu k3b device not found smartmovies ed2k
|
|