IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-20
Pages: < Prev
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
Next >
[00:41]<gudysv>like 'GLOBALS' in get_defined_vars
[00:43]<||aw>numist: um, not to create one in the first place?
[00:43]<gudysv>cant. get_defined_vars will always contain an infinitely deep referenc
[00:44]<vxnjvxnzfyrxv|wj>what takes less strain on a system... reading/writing files, or reading/writing a database?
[00:45]<||aw>but globals is the only one that php will recurse
[00:45]<||aw>theotherlight|wo: depends on load, a db will have better caching at higher load
[00:46]<wyff[wnzc]>Depends on writing what.
[00:47]<vxnjvxnzfyrxv|wj>just writing long strings of text
[00:47]<vxnjvxnzfyrxv|wj>no huge formatting... just simple text, but potentially in large loads
[00:47]<wyff[wnzc]>And then do what with it?
[00:47]<vxnjvxnzfyrxv|wj>access it.
[00:47]<vxnjvxnzfyrxv|wj>probably quite frequently
[00:47]<vxnjvxnzfyrxv|wj>potentially every page
[00:48]<txgwzzmgg>How can I get the HTTP status code in PHP?
[00:48]<||aw>numist: um, globals doens't seem to be in that array
[00:48]<gudysv>||cw: The account has been created. Paul needs to sign the security statement
[00:48]<gudysv>for the account and pick up his password. He can stop by CSE Help office
[00:48]<gudysv>ugh
[00:48]<||aw>haha
[00:48]<gudysv>||cw: http://pastebin.com/727072
[00:48]<||aw>numist: what php version
[00:49]<gudysv>5.whatever
[00:49]<gudysv>5.1.4 cli
[00:49]<||aw>hm, 4.4.0 cli deosn't have globals in it
[00:50]<||aw>via php -r 'print_r(get_defined_vars());'|less
[00:50]<dycnpjj>Stormchaser: whats wrong with direct admin?
[00:50]<||aw>and 5.0 does
[00:50]<||aw>what kinda sucks
[00:50]<gudysv>yep
[00:50]<sdzwjz>any idea why my script here on my windows box running xampp runs fine, but when I up it to my linux server I get this error Error: 7 Connect failed; Operation now in progress
[00:51]<||aw>numist: but again, GLOBALS is the only one, so ignore it
[00:52]<gmmygsvjgg>hello, does anybody knows a good dao framework for php?
[00:55]<zdz2jd>hello i need litle help
[00:55]<zdz2jd>i want to make text lines into array
[00:55]<zdz2jd>but every 10th lines gose into array
[00:56]<zdz2jd>not one by one
[00:56]<gudysv>||cw: it would be nice to have a programmatic way to detect the recursion so I could catch future possibilities
[00:56]<gudysv>its the Right Thing To Do
[00:58]<zdz2jd>anybody home?
[00:58]<fndzjf>I'm not here
[00:58]<fndzjf>;P
[00:58]<zdz2jd>is there a way to save text lines into array
[00:58]<zdz2jd>i know per line using $check = explode("\n", $txt);
[00:58]<zdz2jd>but i want first to 10th line then 10th to 20th and so on?
[00:59]<wyff[wnzc]>airboy, file()?
[00:59]<zdz2jd>no post[]
[00:59]<fndzjf>airboy: maybe You should 2 arrays
[00:59]<zdz2jd>how?
[01:00]<fndzjf>temporary array
[01:00]<zdz2jd>can u plz tell me how code sample?
[01:00]<rrppygrvnm>!tell airboy about u
[01:01]<fndzjf>caffinated: ?
[01:01]<zdz2jd>i did like this
[01:01]<zdz2jd>$wrap = wordwrap(trim($txtdescription), "60");
[01:01]<zdz2jd>$check = array();
[01:01]<zdz2jd>$check = explode("\n", $wrap);
[01:01]<zdz2jd>$num_lines = count($check);
[01:01]<zdz2jd>now i know total lines number
[01:01]<zdz2jd>but i want to split from first line to 10th and so on
[01:02]<nuwy>The documentation says that openssl_private_encrypt can use OPENSSL_NO_PADDING, but when you use it, the result is empty.
[01:03]<rrppygrvnm>airboy: use array_splice() to remove the array portions you don't want/need
[01:03]<nuwy>demo: http://pastebin.ca/57203
[01:05]<zdz2jd>hmm ok thanks going to try
[01:06]<fndzjf>$check = explode("\n", $wrap);
[01:06]<fndzjf>$num_lines = count($check);
[01:06]<fndzjf>$s=$num_lines/10;
[01:06]<fndzjf>for ( $i=0;$i<$s;$i++ ) {
[01:06]<fndzjf> $xxx="";
[01:06]<fndzjf> for ( $j=0;$j<10;$j++ ) {
[01:06]<fndzjf> $xxx . = $check[(10*$i)+$j] ;
[01:06]<fndzjf> }
[01:06]<svjzdzxzsnz>idiots
[01:06]<svjzdzxzsnz>!tell peyrol about pastebin
[01:06]<svjzdzxzsnz>Use it or loose it
[01:07]<svjzdzxzsnz>woof :)
[01:07]<jdrs>re:
[01:07]<rrppygrvnm>not to mention, that code is retarded
[01:08]<svjzdzxzsnz>caffinated: It doesn't get any better than retarted code :)
[01:08]<jdrs>What can be happening in a server using php 4.4.x and that can't dump global vars?
[01:09]<jdrs>Does having globals on prevent the use of using $GLOBALS?
[01:09]<rrppygrvnm>omgs: no
[01:09]<rrppygrvnm>omgs: it's more likely something you're doing wrong in your code
[01:09]<jdrs>Then, what can be happening that aren't any custom $GLOBALS?
[01:10]<jdrs>The same code works ok in other servers using php 4.3.x and globals off
[01:10]<rrppygrvnm>omgs: you're likely either a) mispelling it, b) redefining it, or c) not setting the global variable you're trying to check
[01:10]<jdrs>I don't know if there are any other settings that can affect that behaviour
[01:10]<zdz2jd>thank you peyrol
[01:10]<svjzdzxzsnz>airboy: hum?
[01:11]<zdz2jd>yep code is working
[01:11]<zdz2jd>but its prting from 10th to 20th line
[01:11]<rrppygrvnm>airboy: I wouldn't thank him for that. that code is junk, and could be condensed in to something half the size.
[01:11]<rrppygrvnm>hell, it could be even smaller.
[01:11]<rrppygrvnm>i could do that in one line.
[01:12]<zdz2jd>hmm ok then help me plz
[01:12]<rrppygrvnm>i did. you just didn't bother to look in to it
[01:12]<zdz2jd>array_splice yep
[01:12]<rrppygrvnm>you have an array, you want some ranges removed, so use array_splice to remove them
[01:12]<zdz2jd>yep ok
[01:12]<evzgczzzjff>...
[01:18]<jdrs>caffinated: well, what else do you need?







