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



Comments:

<0> oh right kk
<1> but I think you need a "SET" after "$table_name"
<0> says query was empty
<2> I have a conceptual question about OO
<1> and thats b/c you are you using "$sgl" instead of "$sql"
<2> I have a few cl***es which need to use the variables in config.php
<0> heh oops
<2> So, I have to include_once("config.php"); in each cl*** file
<2> is that a good OO style?
<0> GregVernon, thanks
<1> CptBrutal: np :)
<3> g isn't even next to q!
<1> yeah, I was just as confused when I saw that :)
<2> are you considering my questions?
<4> DavidHKMrPowers: whatever floats your boat :)
<0> yeah but the look alike.. sorta..



<1> DavidHKMrPowers: I would do that
<1> but, I don't cus I register all my needed variables as globals
<4> DavidHKMrPowers: i find it a good practise to always include a header script that makes the connections to db, and loads configuration files - they create a $config global that contains all the variables.
<2> if I have a index.php which include_once the cl*** file and include_once the config.php
<2> but the cl*** file include the config.php although include_once can solve the problem
<2> Meltir: you meant we have to include things many times no matter the things have be done many times
<1> DavidHKMrPowers: do you even *need* to use include_once? just use include, then it will be included for all the other cl***es
<5> DavidHKMrPowers:what do you define as "good OO style"? my usual approach with an all OO app is a registry cl*** for common junk
<5> http://www.phppatterns.com/docs/design/the_registry?s=registry
<2> actually, should I use include or extend?
<1> dude, just use include
<1> :P
<2> ie, extend a cl*** which contains all the variables
<4> for stuff like configs - use require
<2> there comes the conceptual problem
<4> i fail to notice it.
<2> shouldn't cl*** be as independent as it can be, other than using its extended cl***es ?
<5> why would you extend it? public properties are a useful thing
<1> DavidHKMrPowers: really, all you should be worried about is your own ideas about OO design, and what others working on the project think should happen
<4> DavidHKMrPowers: i see the entire configuration as one static object.
<2> Meltir: is that good to use global in OO??
<4> DavidHKMrPowers: sometimes its a neccesary evil
<2> GregVernon: so, I am confused of the concept
<4> thats whay its there for
<4> *why
<4> crap
<4> time to sleep
<1> Meltir: lmao
<2> Meltir: good night
<1> David.....: Honestly, if it works, and isn't insecure, it should work
<1> Meltir: g'nite
<4> gnite
<2> index.php declare phpbb_root_path and include cl*** A
<2> cl*** A uses the declared phpbb_root.path to include config.php
<2> then, cl*** A becomes dependent on index.php
<1> yes
<1> is that a problem?
<2> my point is, where should I include the config.php
<2> in index.php or the cl***?
<1> DavidHKMrPowers: I always put the includes (that are non-cl*** dependent) in index.php
<6> got an issue under php 4.4.1 I'm hoping someone can help with. I'm tailing a file by pausing a second, then updating the pointer with fseek ($fp, ftell($fp)). This has worked well until I tried to start watching for UDP broadcasts with @socket_recvfrom... after about 3 seconds of running, the code locks up on the socket command.
<2> so, you cannot test the cl*** file alone?
<6> if I comment out @socket_recvfrom, it runs fine, but of course I can't see broadcast messages then.
<1> well, thats just how I do it
<2> because the cl*** does not have the necessary config.php
<1> I usually have my cl***es generate output text, then the index.php file retrieves it
<1> but, putting the include in the cl*** file it self would not be a problem
<1> its *all* a matter of opinion
<2> if index.php is in /FOLDER1/
<2> cl***.php is in /FOLDER1/FOLDER2/
<1> include("../config.php");
<1> ***uming config.php is in /FOLDER1/
<2> then, again, the cl*** has to change the path when index.php changes its path
<1> :/
<1> your making this too complicated
<1> w/e works for you, generally should be fine
<2> I p*** a phpbb_root_path = "./" in index.php and p*** it to cl***.php
<2> the cl*** can then include_once phpbb_root_path . "config.php"
<2> the include will be independent of the path of index.php
<2> BUT it makes itself dependent on the existence of index.php
<7> Pollita, ping



<1> is index.php calling the cl*** to begin with?
<1> if so, its already dependent
<2> GragVernon : yes, it uses a static funtion in it
<2> function
<2> index.php is dependent on others but cl*** should be independent, right??
<1> I usually go the other way around...
<2> did you meet any problems?
<2> face
<1> not many
<1> its not hard to add functionality to either index.php or the cl***es to resolve the issues there
<1> brb
<2> auroraeosrose : I think a good OO style is that cl***es can be closed from modifying but open for adding
<2> should be closed from modifying
<1> okay, i'm back
<7> liz ? :O
<7> DavidHKMrPowers, where you see auroraeosrose ?
<2> oh, he's left but answered my question few mins ago
<2> CPUnerdX:
<7> she ;)
<7> dang I had to talk to her!
<2> o_O
<2> you dang me?
<7> no..
<2> should be ding?
<7> bleh, quiet.
<7> Pollita, drop me a msg when you get back, I'm fixing the hash_tiger for ppc and I need some advices for couple ifdefs and stuff.
<8> aidan, you here?
<9> yes
<8> i got it working, i figured out what the problem was
<9> oh good
<8> wanted to apologize for lacking communication earlier
<9> no problem :)
<8> I just have a question now and that's about it
<8> then i'll gtfo =]
<8> RewriteRule ^register/?$ index.php?option=register works fine and all but lets say I want to take wild cards, for example RewriteRule ^*/?$ index.php?option=wild_card_value_here, how do I do that?
<3> tek, that's mod_rewrite
<3> This is ##php
<9> that's a bad idea, but you can do it with *, just put braces around it if you want to capture the value
<8> Julian|Work, I know man I apologize, but #apache hasn't responded to any of my questions
<9> ^(*)/?$
<10> could anyone point me where I could get started with these regular expressions, please?
<3> That's good enough
<3> ArthurMaciel, google regular expression tutorial
<9> ArthurMaciel: regex.info
<10> what is regex.info?
<3> www.regex.info
<8> RewriteRule ^(*)/?$ index.php?option=$1 returns an internal error when I try to type in something that I don't already have a rewriterule for
<10> ok.
<10> thanks
<9> (.*)
<8> Oh that's right, gah my regex is a little rusty.
<9> again, doing that is a really bad idea
<9> if google tries to index your site, any page they go to is valid ... site.com/fsdf/sdfs/dfs/df/sdf will be a valid page ... which it shouldn't be
<8> It's for site.com/username
<9> then do site.com/user/username
<9> and if username isn't valid, header(404 ..); exit;
<8> k
<1> tek: tell me this isn't supposed to be something like myspace :(
<8> GregVernon: ?
<1> site.com/user
<1> nvm
<8> GregVernon: I dont think myspace is the only thing that uses a similar URL syntax...
<1> I know, but ur questions...
<1> just nvm
<8> trust me, it's not =p
<1> good
<11> hello
<1> hi
<11> anybody had set php and mysql two pc
<1> huh?
<11> mysql one pc php one pc
<12> alien what os are you running?
<11> win xp
<1> alient3d: that shouldn't be a problem


Name:

Comments:

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






Return to #php
or
Go to some related logs:

Perl nanobot
ubuntu ipv6 doesn't work
#math
#suse
#gimp
recent: UPDATE seconds: 60 hit_count: 4
myqsl restart debian
pureftpd ftpadmin
evancarrol
gentoo timezone-data -index -Index eastern



Home  |  disclaimer  |  contact  |  submit quotes