@# 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 30 31 32 33 34



Comments:

<0> or just use strtotime()
<1> You can verify it on php.net/mktime, if you can read it.
<2> any help for my cl*** question??? :)
<3> oh, 1970
<1> Kaitlyn: you're using PHP 4
<2> CryWolf: ya? what.. private wasn't available in php4?
<4> crywolf : it looks right to me
<1> nope. new to php5
<2> are you serious? whatt
<4> crywolf : hour, min, sec, month, day, year, and int is_dst
<1> vogue: ah, I hadn't realized you actually saw that line.
<1> vogue: and what does date('Y-m-d', $key) give you?
<4> lemme check! good idea
<4> ****.. lol
<4> all december
<1> and I presume this entire time, you've been checking the values of $month, $day, and $year



<4> haha... it's so stupid. omg.
<4> sorry! months are strings, need to change them to #s
<1> Sounds like strtotime would suit you better
<3> int gmmktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] ) i like how it has the is_dst param, and in a note: Parameters always represent a GMT date so is_dst doesn't influence the result.
<4> sorry :(
<2> CryWolf: is there some way to prevent a var from being set outside the object?
<3> Kaitlyn: just put a comment before it saying 'don't ****ing use this outside the object.' and if they do, its their fault
<1> Kaitlyn: how do you mean?
<2> i don't wnat someone to be able to $test->var = 'ABC';
<1> stand behind them with a baseball bat.
<1> name it _var and hope they understand what that means.
<2> CryWolf: I am using it as part of a... "license cl***"... although there is "plenty" of protection, i don't want them to be able to change the object variable if possible..
<1> Kaitlyn: regardless of what you do, they can change it. There's nothing keeping them from editing the cl*** itself.
<5> hello all
<2> CryWolf: it is encrypted
<5> i am trying to debug a program, and want to show the output off all data processed through a for loop
<5> how might i do this?
<5> for ($i = 0; $i < count($ins_fields["data"]); $i++){
<2> rosenjon: what about: echo '<pre>'; print_r($ins_fields); ???
<5> ill try it
<5> do i put it inside the loop?
<6> no
<2> no, replace your loop with that
<5> well....let me give a little background
<5> i am working with a wiki program in php that is used to edit information
<1> background is usually unnecessary
<2> :)
<2> if what ur doing is debugging, who cares how you get all the contents of a variable/variables?
<2> just do that print_r
<3> !tell Kaitlyn about u
<2> its great for debugging!
<5> ok.....well the short answer is that i want what happens to $ins_fields, not the data contained in it
<3> i need to get my hands on a bible
<2> and how does looping tell you what "happens" to the variable?
<3> Kaitlyn: you could log it through arrays
<5> i am unable to store certain values in my app, because i think the counter is somehow bugged, but i cant figure out why the values aren't being stored until i see how ins_fields is processed through the script
<6> so echo ins_fields every time you do something to it
<5> the loop function takes the data and stores it in the database, by processing each field by its type (text, date, number, etc.) and storing each sequentially until the loop is over
<5> the number of fields is stored in $ins_fields -- and that counter i pasted loops until all fields have been inserted
<5> there is obviously a lot more code that follows the loop, but what i want is to be able to see where the loop functions stops inserting data into the database
<2> I have a gneral question. I have yet to really dip my toes in PHP 5... but for those who right scripts for download/selling/whatever, how do you deal with the differences between PHP 4 and PHP 5?
<3> Kaitlyn: you write for one, and hope its backward compatable (i've had very few issues)
<2> itrebal: you write for PHP4 or PHP5?
<2> because PHP5 seems to had PLENTY of new functions and "enhancements"
<5> kaitlyn-- do i have to use </pre>?
<3> i write for php5... and hope it works for php6
<2> rosenjon: don't HAVE to.. its just HTML, but might as well
<2> itrebal: i see :)
<5> and also -- i saw you used '<pre>' -- should i use the quotes
<3> Kaitlyn: everyone i code for is on php5
<2> itrebal: okay
<5> kaitlyn -- what does the ??? do after the print_r
<5> or was that not part of the code
<7> rosenjon: if you use any HTML tags that has a closing tag, you should close it.
<7> that is a _must_ if you're writing XHTML
<5> should i quote '' the <pre> tags?
<5> '<pre>'
<5> or just <pre>
<7> in PHP code? yes. $var = '<pre>';
<5> '<pre>'; print_r($ins_fields); '</pre>'
<7> echo '<pre>'; print_r($ins_fields); echo '</pre>';



<3> lol, i do that alot
<3> so i wrote a wrapper to the function
<2> me too :)
<2> printp_r :)
<7> i just print_r and look at the source :)
<2> deadroot: blah! that's horrible! haha
<8> heh
<7> :p
<9> :P
<3> deadroot: i did that too, then i started using Tidy to nicely tab my code, and of course, it gets rid of unnecisary line breaks :(
<3> ouch!
<9> er
<7> i hope that you didn't use tidy for production servers
<3> deadroot: whys that?
<7> it's worth formating the source code?
<7> i mean, on the fly?
<7> *formatting the output source code on the fly?
<3> deadroot: the way my templating works it gets messy in the output.... however... i'll have it only run when $_GET['tidy'] is on
<7> oh
<3> http://itrebal.com/ see, the code is nicely tabed, something completely acheivable on a simple page... but on a larger site it gets messy
<2> what is the point in having nicely formatted code though?
<3> Kaitlyn: debugging?
<2> hmm
<2> :)
<7> yes. but proper application of semantic HTML and CSS can remove a lot of cruft. also, Firefox's DOM Inpsector is neat :)
<6> Easier to read when you have a programming team
<2> i suppose
<10> can anyone look at this: http://pastebin.com/636904 im trying to make a login system, but it seems that im always getting failed?
<11> itrebal: tabbing a huge site sn't hard.
<11> its when you start echoing php that tabbing gets hard.
<3> Gimp_: it is when its almost 100% dynamically created
<11> itrebal: thats whats hard.
<11> heh
<10> how>?
<10> how is that hard :P
<11> itrebal: see, what i want to do one of these days, is create a cl*** that does the tabs itself
<10> making a list or names putting them into an array and coding css for each tab?
<10> lol
<10> of*
<3> Gimp_: oh! i did that with an RSS-creation-cl*** i made a few years ago
<1> surfdue: http://kyndimarion.net/debugging.html
<7> Gimp_: isn't use Tidy a simpler solution?
<0> no problem getting source formatted correctly with almost everything dynamic :p
<12> how do i load up a local file into a string? file() = array .. . .
<7> ak_47: it is within the list of File System functions
<11> itrebal: but i mean one that i can do all code, and just add the output into a variable, then have the cl*** put the tabs into everything at once.
<13> hola
<3> Gimp_: http://repository.itrebal.com/php/cl***es/rss.cls.php i updated it for php5
<13> hola hay alguien
<11> deadroot: tabbing small code is simple. try taking a couple thousand line php file, and making the output nicely tabbed.
<7> Gimp_: use "tidy"
<11> whoa.,
<7> whoa?
<11> deadroot: I feel stupid. i had no idea t hat even existed...
<3> http://pecl.php.net/package/Tidy
<7> no worries there. it's not well known
<11> itrebal: http://php.net/tidy is where i looked :p
<3> works
<11> deadroot: but then you have to have that installed on the server :p
<3> lol php.net/anything usually works... but i wish it would search configuration directives too...
<7> at least you'll be using another dedicated project's efforts. :D
<13> hola
<13> estan
<13> habblan espaol
<11> itrebal: look at your php.net settings page... i think it can search the entire php manual...
<13> hablan espaolo castellano
<11> DYANFALCON: English only please.
<13> ok, bye
<3> #php.es
<3> i tink
<14> itrebal: php.net/ini.core#ini.extension-dir ... for example.
<3> DYANFALCON: #php-es
<3> kuja: thanks


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#linux
#ubuntu
#css
gentoo livecd agpgart
CS_DESCRIBE_INPUT returned 0
#linux
ln -s php5.so
#oe
multiplayer whiteboard
SDL_CDEject example



Home  |  disclaimer  |  contact  |  submit quotes