| |
| |
| |
|
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> syntax error, question expected before ? on line 1. <1> dont understand how to get that info <1> sorry <0> ok <2> did anyone look at my pastebin? i'm convinced its something stupid that i've done wrong- its short, only 11 lines of code <0> TBNolan: 1 sec <0> TBNolan: whats the issue? <2> it doesn't write $ip to the file, although it does echo it when i tell it to <2> and it doesn't read it when i hardcode it in <0> 'hardcode it in' ? <0> Does the script have write access to the file? <0> permissions wise <2> lets see <2> its rw/r/r <2> so yes <0> one sec
<0> change rw to a <0> and it works <0> theres no RW mode <2> i got it to work by changing it to an r+ and the ' to " <0> http://us3.php.net/manual/en/function.fopen.php <0> yep.. r+ <0> m'bad <2> it will write, but now it won't identify the IP's in the text file, any idea on that? <3> can i do something like: foreach ($array as &$key => &$value) <3> ? <4> you want to reference the key and the value? <5> sketch: I dont think you have to &... its already done <4> lith: it's not <5> aidan: really? if you do foreach($array as $key => $value){ $value = "oh shat"; } it will change all of the $array[x][value]'s into oh shat? <3> lith: it is very definately not ... <5> im sorry $array[x]'s into oh shat ;) <6> i'm using FPDF and trying to apply different formatting to different parts of a cell (it needs to be a cell so it'll be autowrapped). is this possible? <7> anyone know how to change the shared objects that php links to? <4> lith: no it won't <5> sketch: i just tested it... and i believe that changing $value doesnt actually change the original $array. <4> $value is a copy <4> sketch|work: you want to reference the $key as well? <4> sketch|work: I don't think you can... the value, sure .. but if you're changing the key, just make a new array <5> aidan: so then, effectivly, foreach($array as $key => $value){ } is the same as doing foreach($array as &$key => &$value) {...} ? <4> lith: NO... COPY NOT REFERENCE <8> copy means if you change a variable, the original will not change <4> I've said it's not, sketch has said it is not, I said it won't again, why are you still asking <8> reference means you are changing both variables <8> the one you are referring to and the original <5> I'm asking for clearification on a rather complicated issue to begin with :/ <5> no need to get all pissy mang <9> lith: are you thinking of foreach($array as $key => $value) { $array[$key] = $newvalue; } ? <5> Crywolf: no in my mind, i have this connected: p*** a reference to objects/arrays/values that you want to change and not effect the original... dont p*** a reference if you want the original to change when you change the value. this is my only understanding of references. <9> lith: copy = unix cp command. reference = unix ln command. <5> if its wrong, i want to make correct "connections" or "thought process's" in my mind. <9> you have it completely backwards <5> CryWolf: ;) well now i know <4> :) <4> I'm off, later :) <10> Here's a good question: what is a halfway decent photo gallery application for a community site? <11> Is there a function to remove all empty elements from an array? <10> We're having some problems with one on rangefinderforum.com. :P <11> Hmm, I'll probably just go array_diff($array, array("")); <12> Stephanie, define "halfway decent" :) <11> Will this do it? <10> jonez: Something that doesn't **** as much as vbPortal. <12> it's not that hard to write one, really <12> have you tried all the ones on, say, freshmeat.net and found nothing to your liking? <10> I was asking more for opinions on good and bad ones. ;) <12> oh :) <12> well.. uhmm.. I needed to write a gallery of sorts, and I wound up doing it custom so I was sure it had the features I needed. <12> so I couldn't really give you an opinion on existing ones.. I would say "write your own" <10> That's what I'd love to see done. <13> Is there some way to handle form values that are mapped to objects in a database? <9> Myconid3: yes. <13> easier than manually? <13> I have a page with close to 100 fields on it.. and I am really not looking forward to handling those one by one <9> that depends on how you define manually. You haven't said anything about what you need to handle, or how you're doing it now. <13> and it really seems like there should be a simpler way <13> I have line items for purchase orders.
<13> I manually draw the form. <13> I then use $_POST to map them to the fields <13> and do operations <9> stop using your enter key as punctuation <13> and then the object manually inserts itself into the database <9> given that, it sounds like you want to use a loop. <13> So then there isnt an easy way <9> it does? wow. I'm impressed. <9> Myconid3: I've done my best with the information available. <13> I see all these cool demos of Ruby on rails.. where they automatically populate forms, and submit them back to the object, which puts itself into the database automatically. <13> parsing forms gets old fast <9> parsing forms? I usually just act on the posted values. <13> thats horribly manual <9> Depends on how you do it. <9> Myconid3: Like I said, use a loop. Use more than one if you need to. <0> CryWolf: you wana do some PHP for me? :) <14> Myconid: are the names of the form fields the same as in the database? <10> No, I'm just ignoring you for now while I figure out a couple of problems. :p <9> myconid: I can refer you to my company's website. <0> lol <15> myconid: CryWolf wasn't kidding. <0> Jymmm: i didnt imply I didnt believe him. <9> nope. that's the only way I'll do some PHP for you. Especially if I have to determine specs and the like on my own. <16> but thats the beauty of implying... <0> There was no implication :) <16> so you say <16> :) <0> Im still waiting for a URL <17> hum... <16> me too, i wanna see if i can outsource my job or two <17> not sure if i understand the "Predefined Constants" of cURL <18> This stupid little piece of code keeps getting more and more complicated as I go along <18> so why don't I just ask? Anybody know of a simple way to check if a port on IP X is active/open, reliably? <18> currently I've been using @fsockopen ("X",Y, $errno, $errstr, 1); <18> but, for some reason that returns 0 when I *know* it's up and running. <19> Hello all. question using php 5.1.2 was there a change in how the cli version worked? <12> Lothri1, ***uming for the moment that doing that is the "best" way to do things, you say you get 0 as a result.. did $errno also come back as 0? <20> hey guys. i am writing a php/mysql website <20> i am wondering, i want people to be presented with a username and p***word prompt when they first visit the website and i want it to continue to use that username and p***word throughout their session <12> neat, I'm writing a php/pgsql one :) <20> cool <20> whats the best way to do that? <12> PuGz, so put session_start() at the beginning of each module in your site. <21> I'm doing php/sqlite, whee. gotta love variety <20> hehe <20> jonez: ok... i will look into that <12> when somebody logs in, store either a userid and reference a database, or put the username right into $_SESSION <19> PuGz: best way of creating a php/mysql site? First start with php and be sure you have a mysql server running <12> PuGz, ya, read http://php.net/session <20> Remowylliams: a good answer <20> jonez: cheers <12> :) <12> that ought to get you started.. if you have any questions, you can come in here. <20> sweet <20> its a long read! <20> haha <20> all good <19> PuGz: Sorry but php can do a bajillion things. start by reading the manual to php and get an idea of how variables and such are handled. <12> PuGz, are you familiar with any other programming languages? <20> i have a php book that i think this will be in <20> i am familiary with c, c++, java <20> oh, and c# <20> jonez: i just have to find the book! <12> hmm.. java prolly has something like php's "***ociative arrays".. aka "hash tables", etc. <20> ahhh <12> $_SESSION is a "hash table".. key is in quotes within square brackets and is a string, and values can be anything. <12> for example, $_SESSION["foo"] = "bar" <12> for "indexed" arrays, the syntax is the same, but you use integers within the brackets, like $foo[0] = "bar"; $foo[1] = "baz"; <12> that should be enough to get you started :) <20> jonez: cheers - that helps! <19> So anyone have any clue about CLI behavior? <12> Remowylliams, I don't use php as a cli language.. I use python instead.
Return to
#php or Go to some related
logs:
#suse snd_mixer_oss not found gentoo net.eth0 inactive Get directory path from FILE* c++
libccgnu2 ubuntu #math OIL: ERROR liboiltest.c 247: (): illegal instruction in trans8x8_u16_mmx
#bash #openzaurus kst quakenet
|
|