@# 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> Hurrah! thanks!
<1> http://www.play.com/play247.asp?page=title&r=BOOK&title=660430&p=91&g=148&pa=sr does that look like a decent intro to OOP?
<2> Damn I hate these "Are you sure that you want to exit the program?"
<3> kidzer: since the book deals with concepts and is not linguistically-spacific, i would say that it's probably a safe start.
<3> s/spacific/specific
<1> specific :)
<4> Arafangion: tab enter or enter usually fixes those effectively
<1> Cool, i'll see if I can get a hold of it then :)
<5> ShuaiKing: Going further, almost any sequence of output that evaluates to strings can be used in the same fashion as the $_POST array reference there. If you glue your output with the dots, you'll have a fine string to "do stuff with".
<2> myc: Usually.
<6> hi
<0> Stupid question, how do you add 1 to something
<6> does anyone know whether it is ok to use $this in a cl*** constructor?
<0> I have a really stupid line that doersn't work
<3> kidzer: programming is 90% concept and 10% language



<5> ShuaiKing: When you fumble around in the php.net manual text, you can see the "return type" of each function. $number++;
<7> $num++ or $num += 1 or $num = $num + 1
<3> ShuaiKing: either $variable = $variable + 1 OR $variable++
<2> kidzer: Once you become somewhat language agnostic, you're already ahead of most uni students.
<8> Indeed. They're learning to think in Java. :P
<2> DAMN.
<3> kidzer: keep in mind that we're giving you advice to become a -real- programmer, -not- someone who knows how to write PHP
<2> Man, I HATE WINDOWS.
<5> ShuaiKing: There are quite fine pages about these basic, groundwork stuff at php.net, and they walk you through this stuff, with examples really well.
<0> Well, I'm using this http://pastebin.com/575651 code, it's not working.
<3> Arafangion: take it to #billgatesisgay
<3> ShuaiKing: www.w3schools.com/php
<1> what does agnostic mean?
<2> b1n0ry: Yes, I'm having to head off to uni, (late), so I shut down my laptop to take with me.
<2> b1n0ry: Turns out that windows wants to apply updates now.
<7> ShuaiKing: lol!
<8> Doesn't it give you the option not to?
<0> Nope.
<3> i've had production servers that i come in and say "Windows has automatically updated your computer and required an automatic reboot..."
<5> ShuaiKing: The $result as a quite different structure. It is a "resource" (resource is its type).
<9> hi aal
<0> So can I convert it or something to a number/string thing?
<2> mattmcc: I was in a hurry, so didn't realise that the icon for power off had a shield in it, and didn't want to investigate what the shield means.
<3> kidzer: in this sense it means you understand enough of the concept to be able to apply it universally
<2> mattmcc: (I use linux most of the time)
<5> ShuaiKing: Yep, that is its goal in life! It wants you to do stuff with it.
<9> I got a question ....howcome when I try to "display the output from my "FILE" input I get nothing
<9> ????
<2> mattmcc: Cya :)
<9> echo "<br><br><h1><font color='black'>File is: ".$_POST['sfile']."</font></h1>"; <--- mycode
<8> So there's nothing in $_POST['sfile'].
<9> and $_POST['sfile'] is from <input type="file" name="sfile">
<1> b1n0ry: cheers, apologies for my seeming lack of knowledge - im still in secondary school so not all that bright in the grand scheme of things
<0> So, how would I go about converting it or somethign
<8> Ah. You want $_FILES['sfile']
<9> but I press brows and choose a file... howcome?
<8> Which is an array.
<3> BeeR: input type = file is a special case input type. it's not $_POST
<8> BeeR: See http://php.net/features.file-upload
<7> BeeR: http://www.php.net/features.file-upload
<7> snap
<3> BeeR: http://www.php.net/features.file-upload
<4> can I foreach over public var's in an object?
<10> b1n0ry: ...
<9> I see so i should replace $_POST with $_FILES even though my form is POST?
<3> Stormchaser: dolt... i pulled it out of my favorites, lol
<8> BeeR: PHP separates files into its own array, since it has more information than just a value to give you.
<3> BeeR: and not just $_FILES, specifically the subkey of $_FILES that you want
<4> Is it possible to iterate over an objects public var's?
<9> I see 1 sec
<8> Temp name, type, size, relevant error, etc. Read the manual page.
<9> Hold ON
<9> I don't want to upload anything
<3> BeeR: remember that when you post a file, you're getting binary data, a name, a size, a mime type. what do you want to output with your echo statement?
<9> I want to send it with my mail function
<3> BeeR: if you post with an input type=file you are already uploading something
<9> I mean along with my email
<8> How do you plan on getting it off the client machine without uploading it? :)
<3> mattmcc: good question



<9> ummm tuffy
<7> love the silence
<9> what do you suggest?
<3> BeeR: uploading it
<9> but I don't want the server to get like 1000's of usless files that users upload
<9> is there a way to manage this>
<8> You don't have to keep them, of course.
<8> But you need to at least have them long enough to turn around and send them.
<9> umm so is there a way to auto delete them?
<8> Cron?
<3> BeeR: if you are accepting files from the user and sending them through your system, you get the files. but one of the parameters that $_FILES gives you is the temporary storage name/location of the file, so feel free to delete it when you're done with it.
<9> sorry i just never dealt with files in PHP
<9> my first time
<11> greetings
<8> If you're receiving the upload and sending the message in one PHP instance, you can just use the temp file; it's removed by PHP automatically.
<8> However, that may be error-prone.
<9> b1n0ry, tnx thats my clearer
<11> is there a quick way of stripping all non alpha-numeric characters from a string?
<8> The file may not upload successfully, the message may not be sent..
<12> FenixRF: regex for [^[:alphanum:]]
<9> mattmcc: I see, so lets say I uploaded it
<9> nowhow do i attache the file to may message?
<3> FenixRF: $newvar = preg_replace('/[^0-9a-f]/i','',$oldvar);
<3> sorry, a-z, not a-f
<9> attach*
<11> ok... I gotta learn regex :)
<11> thanks b1n0ry
<8> BeeR: Compose a MIME e-mail. Probably using a tool like PEAR's Mail_Mime or similar.
<11> yeah, I deserve it :)
<3> that's all single-quotes, btw
<8> BeeR: Doing it by hand with mail(), while possible, would not be much fun.
<3> alright, i gotta get going. COB, so have a good one.
<8> I'm in the mood for a 2lbs burrito.
<8> Hrm. And a stop by an ATM, apparently.
<9> mattmcc: what if Im using "PHPMAILER" cl***
<13> mattmcc - get me one. you can mail it.
<14> mattmcc, pick me up one too
<8> BeeR: I'm not familiar with that cl***.
<8> enygma: Alright, but it might be a little cold.
<13> pfft
<9> bro never mind I think I got what I need to do with MIME
<9> tnx for the info tough
<9> will start coding now
<15> why doesn't this work? $postdata = $formname[2]+"="+$id[0];
<16> how do i get php5 to work with apache2
<16> on debain
<17> I'm not sure what i'm doing with my php.. but my code is working the first time I run it. that scares me a bit.
<18> thin: what lang do you come from?
<15> itrebal: heh, i dunno, how do you add strings together in php? :P
<18> thin: . not +
<15> hmm
<9> mattmcc ok lets say that I got the upload function working and my files upload to "test" folder
<9> how can I get the file that was uploaded?
<15> itrebal: weird, i get a space between the = and the $id (there shouldn't be any..)
<19> Hey everyone. I'm trying to install php5 from source with the --with-mysql option, but mysql_connect isn't callable after the install. I noticed that none of the modules in the modules folder are installed during make install. Do I have to do something to get the mysql extension installed?
<20> BeeR: move_uploaded_file, just like the example says
<21> FliesLikeABrick FliesLikeALap : wth? lol
<12> 6d,ZH1NP_gael of a modern major general <- something seems a tad bit odd...
<22> how come when I generate a transparent Image with GD in Firefox, it loads transparent with no problems, but in internet explorer it doesnt
<23> Jymmm FliesLikeABrick is my main name and FliesLikeALap is me on my laptop
<21> killer-instinct IE doens't support Alpha channel PNG's
<8> BeeR: The location of the temp file where PHP put it is in the $_FILES array. The manual page details the structure of that array, and includes code examples.
<24> killer-instinct: That's becuase IE6 doesn't support that feature
<25> killer-instinct: because IE doensn't do PNG transparency without hackage
<22> oh, what about GIF transparency
<22> would that work?
<21> tias


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#perl
mirc For Debian
libsdl spdif
#linux
#perl
apxs2 EMERGE
unball deitarion
cygwin xdcmp
linux 82852/855GM allocate memory
#perl



Home  |  disclaimer  |  contact  |  submit quotes