| |
| |
| |
|
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
Comments:
<0> didn't think of that <0> what does -> do for it? <1> Does anyone know how I specify the data type of an argument in a function (strongly typed PHP) ? <2> Stormchaser, Then where will I put it? I figure there has to be some online solution. So if I switched jobs I would still have access. <3> Jemt: impossible <1> philip: Ok, bugger. Thanks <4> philip, I dont belive the session.trans_sid is what i need <5> Jemt: do you mean using function like is_array() is_int() etc? <3> he mans writing PHP like C :) <1> Something like : public function Test(string var1, int var2) <2> Ewww.. he's all over me. <6> will: Put it in the highly guarded vault, explosion-proof, heat proof and otherwise. <7> sorry, will
<4> philip, when I call session_start at the top of the page it keeps getting a new session id in IE, but not in FireFox, and IE is NOT blocking cookies, and this same app works with IE and FireFox on a different server.... <5> Jemt: function Test($var1, $var2) { if(!is_int($var2)) { return "error"; } } <2> Stormchaser, We have one at the office. But what if I left the company... <6> will: WTF? I can't even *believe* you SAID that o.O <1> [fields]: I know - but it has something to do with the fact that I want PHP to act like a strongly typed language <8> Jemt: No, you cannot specify return types, i wish you could though. <7> Stormchaser: he may work for a ban <7> k <6> ah >:) <2> Stormchaser, Why? <6> will: 'cause you're an idiot. <3> clyrrad: there are many session related directives, compare them on the two servers <7> Stormchaser: or maybe he works for a ban :) <2> :( <6> itrebal: Much more likely :) <7> hah <1> Would it be overkill or a good aproach to check every single parameter type as the first thing in a function? Depends on how good error handling one wants I guess (?) <7> Jemt: i always check every single param on every function i ever write <8> Jemt, not really most types convert automaticaly anyway. <9> Jemt: Well, bearing in mind how PHP handles type casting, it may or may not be overkill. <3> Jemt: depends on who uses the code library i guess, and how efficient you wnat it <4> philip I dont have access to the other servers php.ini <9> There are certainly cases where you may want to enforce arguments being a certain type, if automatic casting doesn't behave the way you want. <1> Thanks all your guys :) <3> clyrrad: phpinfo() tells all <4> k <8> I never do. <1> mattmcc: I agree <10> Hey, <8> AlexC_: Hey, Hey! <3> Jemt: when using a form, everything is a string for example '1' <1> Yes, I know - but thanks anyways :) <7> philip: unless its an array or file <10> Just wondering if it's possible to run a function from another PHP file _Without_ including/requiring it? <8> true itrebal: <10> So it acts like it's Linked in <3> inside the array... is '1' :) <7> AlexC_: you coul do i guess auto_append or auto_prepend but... its still included in a way <8> AlexC_ NO <10> Ok, no worries then - thanks <7> AlexC_: ^^ <11> is there a way to get the mimetype of a file? <8> yes. <7> beerdeliveryguy: theres an extension to PHP in PECL called 'fileinfo' which is what i use, very reliable <3> many ways :) <11> itrebal, thank you <12> beerdeliveryguy: Yes. However, considering mimetypes are easily forged, be cautious how much trust you place in them. <8> If you are uploading then there is an item in the array for that. <7> walterwo1: it goes off the extension, AFAIK <11> cause im having trouble receiving content throgh a script, when it tries to save, it tries to save as a PHP file. <1> Can I specify types in a foreach loop then? <1> foreach ($tags as $tag => $data) <3> TIAS <1> Never mind, trying it out <1> TIAS? <8> Jemt: generally you do not need to specify types al all. <1> walterwo1: I know <3> Try It And See :) <1> philip: Hehe, ok :) <3> one day you will get over this type kick in php ;)
<8> beerguy are you uploading? <3> we don't know this word 'type' you speak of :) <12> you know, I kinda can see the point of NOT strongly typing... but it might be interesting to provide it as an option. <3> Ahroun: it is an option, use === <3> but i doubt that's what you mean :) <8> Ahroun: True, i would like it. I would also like public and private functions and variables. <13> need some help with how to script this (logic) i have got like a time table, for a room, which people can book out. the day is split up into 5 sessions and there are 4 rooms in total. i want to put the output in a table which i already have. I want to reference the rooms as room1_p1, room2_p1 and so on. the sessions are the p1 section (clearly p2 p3 and so on) any idea? <12> philip: No, not quite. :P <11> hm, i dont seem to have pear installed though <12> bbiaf <8> Andy298: We don't do homework. <14> before you insert something into mysql; should you or shouldnt you escape it? <15> I'm having serious problems with using sessions. If any of you could help, that would be great - http://pastebin.com/627479. Thx in advance <14> if its user input? <0> can I use an array_search to search for an array within an array? <13> walterwo1: its a system im developing for a charity, booking out 4 conference rooms <7> DogWater: you should ALWAYS run mysql_real_escape_string but nothing else <3> DogWater: Don't you Trust your users?!?! :) <14> philip: nein <3> my users are engels <0> array_search($smallarray,$bigarray) <0> array_search($smallarray,$bigarray ? <16> itrebal, why is that good? <3> DogWater: Then, why did you ask? <7> Dahlgren: wuddya mean? <8> Andy298: Then we don't do other peoples projects. Map out an algorithm in psuedo code and then convert it to php. <16> itrebal, what do I protect my self against? <13> is this not a PHP help room? :S <3> DogWater: Read through http://us2.php.net/manual/en/security.magicquotes.php <1> philip: Hehe, hopefully :) <7> Dahlgren: mysql_real_escape_string will escape anything that could do damage against the databse (ie, SQL insertion) <8> Andy298: we offer quick answers to quick questions, not project planning, i would recomend a 2D array. <7> Dahlgren: while leaving the original data intact so to allow you to parse it later on <17> help we do, solutions, not so much ;) <3> If you escape your data, it tells your users that you don't trust them and it could hurt their feelings <18> hi, i just updated some php config (i let this to gentoo -> bad) and now i lack all the media from my php pages.(pictures etc..) any clue where should i look for issues? <16> itrebal, okay! <7> philip: i dont tell my users i escape it :) <16> itrebal, I'll read a little about it =) thanks <7> (besides, they know i dont trust them) <3> heh <7> yup <8> phillip: To H@@@ with there feelings! <13> i guessed it would be a 2d array, however would i need a SQL query for each sessions in each room for each day? ( thats a lot of load on SQL )! <7> walterwo1: profanity isn't an issue <3> Do unto others as you'd have them do unto you! <8> itrebal: To HELL with thier feelings! <7> :D <8> Better itrebal? <7> meh, just letting you know for future reference <7> i find it a h***le to 'bleep' my profanity... <3> profanity is never neeeded <8> I just 'try' to be unoffencive... sometimes. <7> lol <1> Grr, not able to set types in foreach either >.< <7> philip: i find it a great way to express myself in times of h***le or pain <17> Though not necessarily required, profanity can often provide a nice emphasis to a phrase, and anyone that doesn't believe it can kiss my a double-dollar-signs <8> Jemt: Ignore types, your wasting time worrig about them, php does the best type conversions i have ever seen so don't worry about them. <19> i [censored] it best to [censored] what people prefer and just say whatever [censored] to mind <6> <beep><beep><beep><beep><beep><beep><beep><beep><beep>you<beep><beep><beep><beep>,<beep> o.O <7> oh yea Storm? <20> how do i display the max value of a column. i did echo max($row_review_id['file_id']); but it said Warning: Wrong parameter count for max() <6> itrebal: Yea! <7> wow! <19> excellent point Stormchaser, well said <1> walterwo1: Well, there is a reason why not all languages are typeless. It gives you great control over the data. And you are 100% sure what kind of data you can expect. Easier to handle errors etc. <1> Also, I'm still not sure whether PHP will stay typeless in the future - it has "already" adapted OOP <3> Jenks: php.net/max <21> when I try to execute: get_extension_funcs("ffmpeg"); it returns blank, even though i have the extension in my php extensions directory. Anyone know what i might be doing wrong? <3> Jezek: rather <20> eh <8> Jemt, true but you don't have as many tye related errors where there are well implemanted loose type.
Return to
#php or Go to some related
logs:
what will write ,daa files? #gentoo #css disagree about version of symbol struct_module linxine #ldap rkhunter help ubuntu #python gtf etch debian #web
|
|