@# 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 27 28 29



Comments:

<0> s/that/than/g
<0> haha screw you tetsu, programming is a subjective practice
<1> Yeah, im thinking the same way. But i was making this site and somethimes i replace echo with die() and i thik its easier to replace print with die than echo
<0> opCoder32xz: !!!
<0> opCoder32xz: how??
<2> it all should get turned into the same opcodes anyway
<1> You just click print from your editor then start typing die
<3> is it possible for a constructor to return NULL, so that an object instance is not returned (e.g. for invalid data to the constructor)
<2> subjectivity in programming is in algorithm design, how you solve problems
<4> echo makes me feel grown up - print flashbacks to BASIC on the zx spectrum
<0> opCoder32xz: well, i would do find . -name "*.php" | xargs sed -i .bak "s/echo/die/"
<2> php has objects?
<1> unlike with echo where you would nee to do 2 mose click and change the cursor position a couple of times before you can replce echo with die()
<5> can functions return true or false?
<0> EvilGuru: you could throw an exception (php5 only)
<4> opcoder: or you could just use echo()



<0> Wig_: both
<5> im getting an unexpected end of file and it's localized from a function that returns true and false
<1> Xyphoid: i didnt know that
<1> Thanks
<1> Yeah that works
<0> haha
<6> dools: ok, wow, i tried that, and SERVER is defined for this script but somehow SCRIPT_FILENAME isnt listed as defined. is there some setting that could changed which _SERVER vars are defined?
<1> GTG thanks again :)
<0> TheAlien: it could change between versions
<0> TheAlien: is there SCRIPT_URL?
<7> You mean like. PHP_SELF?
<0> TheAlien: do a search in the text it printed for the value you wish to obtain and see what the index is :-)
<0> i think you can also use __FILE__
<7> Cept __FILE__ returns the full absolute path relative to the filesystem...
<8> hi all
<8> anyone here got symphony working on gentoo ? or an idea about PHP zend.ze1_compatibility_mode on gentoo ?
<0> freeone3000: oh right... basename(__FILE__) then :-)
<9> arghhhhhh
<6> dools: http://pastebin.com/753221 shows the issue well -- the same print_r in 2 different scripts on the same server produce different sets of indices?!
<9> } elseif ($file_ext == "gif") {
<9> For some reason, that's not working
<1> When developing a website, wht do you guys first do, create the layout and design?
<1> Before everything else?
<9> hmm
<9> extention is gif
<9> now wtf
<1> Just curios, coz for me i do the design and layout first before anything else, ofcourse i already have the plan of the site
<8> anyone here to help me get zend.ze1_compatibility_mode On with PHP5 on gentoo ? there seem to be no USE flag for it ;(
<1> Writeress isnt it else if ?
<1> not elseif
<4> web applications tend to get built in black and white then be laid out later around here
<9> syntax shows up correct on elseif
<7> else if, elseif, elif.
<4> wait: sure it's reachign that one?
<1> okay, ive not tried it so it must be correct
<1> i see
<10> is it possible to split a code on multiple lines like you can do in bash scripting with \ ?
<9> now this is weird
<6> writeress- i dont write much php anymore but i remember having trouble with elseif before, so i always used if () {} else {if () {} }
<4> thealien: of course you get different vars when running from the command line
<0> opCoder32xz: i do the database design first
<9> hmm
<0> opCoder32xz: of course the interface design and the database design should be completely separate processes. the job of the application layer is to connect the two together
<4> many of the server vars are provided by Apache - when you run from the command line you're not running through Apache at all
<1> dools: yes same here but when youre ready with your plan, and database is ready do you do design and layout before you code your site?
<9> I must be doing it wrong
<9> } else if ($file_ext == 'png') {
<4> what's the rest of your script?
<0> opCoder32xz: yeah, usually do a flat html site, then plug it into my templating engine
<9> it is == not = to check strings right?
<1> Wrieress have you tried printing $file_ext?
<4> that code should work fine, so the rest of your if must be incorrect somewhere
<9> if I preint the variable
<9> #file_ext
<1> dools: i see
<4> put the whole function on pastebin.com
<9> it showed gif
<6> Xyphoid: oh myy you are ofcourse sooo right
<9> which was correct
<9> so this is why im bafffled hmm
<1> Yeah something is wrong with your arguement



<1> try post your code
<1> i mean statement *
<4> GET and POST are HTTP methods which don't make sense in the CLI either
<9> Im going to keep tinkering around
<4> writer: i mean, what's the main if() clause?
<4> that migth always be going off
<9> ahah!!
<9> I think I know one problem
<0> TheAlien: if you want to run from both the command line and apache, then check for isset($argv)&&count($argv) at the beginning and p*** in arguments like arg=value on the cli
<9> its not 'gif'
<7> Hey... When it says that addslashes() is non-recursive, does that mean it can operate on no arrays, or can I still p*** an arg for it/
<9> you need to check for '.gif'
<9> php doesnt parse out the . for soem reason
<9> at least, that is my theory
<7> And if so, does it return an array?
<5> where's a regex that finds a correct email address?
<4> wig: no point. just send email to it
<6> Xyphoid & Dools, ok, thanks for your eye-opener there, i think its the required push toward an answer. this is not where the problem lay, its another one of those tricky elusive situations
<4> wig: if you are not going to validate the email addy by sending email to it, then you may as well just check for a @ and be done
<6> im trying to troubleshoot a script from the web. in order to do it effectivbely i need to turn error reporting on and not depend on php -q. i really should have thought of that. thanks again
<9> ok it works now
<9> what a h***le for a simple .
<4> because checking syntactic validity does nothing to let you know if it's a real address or not
<0> Wig_: http://pastebin.com/753237
<7> .+?@.+?\..+
<7> Best superficial matcher made in 5 mins. And a nice smily. :)
<5> oh nice
<1> Yeah man, if the user intendted to use fake email, even if you have checking it would still fail
<0> i've found that function to be quite useful
<0> i got it off some website like 2.5 years ago
<9> last step
<9> should be an easy way to ignore case when checking strings
<7> Yes.
<7> Adding 'i' somewhere in the method name normally helps.
<4> writeress: if( str_to_lower($str) = "abc" )
<7> or strcasecmp
<7> Either or.
<9> that = shouild be == shouldn't it?
<5> how big is md5?
<5> 30 right?
<11> 32
<9> actualy it's strtolower()
<0> rioter: my company is looking for a php coder in sydney... you any good?
<12> !+jobs
<13> no job posting / asking for jobs on ##php (see /msg php-bot g7). You might want to check out: ##php.jobs http://www.geekfinder.com, http://www.monster.com, http://www.rentacoder.com or http://www.getacoder.com, or php.net/links, "Developers and Job Opportunities".
<0> Wolfpaws: i'm not looking for a job
<14> no, but you're looking for somebody to do a job
<0> ZbouhhhTaff: yep
<5> Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
<5> what does that mean?
<14> so, you should check the adresses the bot just mentionned
<5> i have this:
<5> elseif (!(mysql_query("SELECT * FROM 'user' WHERE 'user_name' = '$_POST['name']'"))
<4> maybe he's not planning on paying - just the old taser-and-cage
<0> ZbouhhhTaff: sure, thanks
<14> we're not from sidney
<14> not even from australia
<14> at last, most of us
<0> ZbouhhhTaff: unlucky
<14> there could be some that actually are from sidney
<15> Wig_: don't use $_POST directly in your query...ever
<15> `user` not 'user' btw
<16> ZbouhhhTaff: That is actually Sydney
<15> and no quotes around user_name
<17> McFly heh was just going to say that, and what is it with mysql people and using `` around col names
<5> k, changed it
<14> ousp
<14> dyslexic
<18> i'm in tasmania
<18> w000
<0> flaccid: i went to friends school in hobart yr 11 and 12
<17> flaccid im sorry
<0> haha
<18> i just moved down here doing uni


Name:

Comments:

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






Return to #php
or
Go to some related logs:

printcap ubuntu error
#fedora
shut down a hard drive ubuntu
undefined symbol: _ZN3KIO9NetAccess12mostLocalURLERK4KURLP7QWidget
Motorola PCS E398 GSM Phone Linux
#fedora
toad sqlexpress
#proftpd
ar5005 gentoo
#fedora



Home  |  disclaimer  |  contact  |  submit quotes