| |
| |
| |
|
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> guess it really pissed me off then <1> How would I match %A0 which is space, in the case of: index.php?foo=%A0bar I can't figure out how to check if foo was set to a value where %A0 is present (I have Tried with ' ' , '%A0' , ' '(space)) <0> jarjar: %20 is a space, I don't know off have what A0 is <1> A0 comes from a <2> has anyone here installed php on iis 6? <0> %A0 is ASCII 160 <1> viewing the html-source in ny browser, shows ' ' <0> it's non-printable <1> ||cw: ahh thanks, so I could check with \160 or how do you specify an ascii character by its number <0> http://www.lookuptables.com/ <1> great <0> 160 is an "a" with little mark ove it <3> hi everybody <3> is it possible to make a function part of an array, and call it with current($key)?? <4> if I understand you correctly, yes. <4> although eval is mostly lame
<1> ||cw: I've got a: print "<input type=\"radio\" name=\"channel\" value=\"$regs[2]\"> where regs start with in several cases, do you know how I can avoid that is converted to other characters (%A0) ? <5> i have array(array('id' = 1, 'code' = 2, 'level'=3)array('id'=2, 'code'=2, 'level'=3)) how can i ***ign the 2 levels to two different variables? <0> jarjar: i can only go by the specs, and %A0 is certainly not a space http://i-technica.com/whitestuff/urlencodechart.html <0> better chart ^ <1> :) sure... thank you for your time and help <0> it is non-printable in ISO-8859-1 <0> but it is not a space <6> jarjar: can you try header("Content-Type: text/plain"); ? <7> How do I tell when an email has been opened on a recipients machine without using the usual receipts? <1> DavidHKMrPowers: sure, just a sec <6> jarjar: thanks <1> DavidHKMrPowers: so what was this about? <6> anyone know what by coding method does php handle string? utf-8 or what? <6> jarjar: just not to view the page as html <8> pinks: there are plenty of ways to do this. google your question. <8> many ways: of which none are php-specific <9> Warning: Cannot modify header information - why does it do that? <7> zbq sorry I tried google - but came up with nothing, and the form is written in PHP <1> DavidHKMrPowers: ok :) thanks... this is partial output: <td> Kanal 94</td><td><input type="radio" name="channel" value=" Kanal 94"></td> this is a table entry, which when selected gives me a lot of %A0 in the url ? (if I only knew why :) <10> DavidHKMrPowers: whats the weather like in HK today ? <6> p0windah: sunny <10> DavidHKMrPowers: I gotta come visit you some time - sounds like a great place to live <6> p0windah: ho ho ho ho ~~~~ <11> Better stay out of Boston then. <5> i have array(array('id' = 1, 'code' = 2, 'level'=3)array('id'=2, 'code'=2, 'level'=3)) how can i ***ign the 2 levels to two different variables? <6> jarjar: so? <9> can somebodyy explain the Warning: Cannot modify header information <12> JaredCE: maybe I'm missing something but $myarray[0]['level'] will give you the first level, 1, the second and just ***ign them. <9> with exit(); and stuff <1> DavidHKMrPowers: so ... ehm what? <13> nardev you have already sent data to the browser and therefore cannot modifiy headers, as they have already been sent <13> either do not sent anything until you modify headers or use output buffering <5> schapht: but if i do echo $myarray[0]['level']; it does nothing <9> ob_clean and things? <12> JaredCE: well the syntax in the code you posted is wrong, so that might have something to do with it <12> it should be: array(array('id' => 1, 'code' => 2, 'level' => 3), array('id'=>2, 'code'=>2, 'level'=>3)) <12> finally, try doing print_r($myarray); to make sure that there's data in there in the first place <6> nardev: maybe it's about the cache thing in php <9> well i am finding the solutions on line but i can't understand the problem <9> why it happens? <6> JaredCE: pastebin.com pastebin it <9> the first time around the users sees a form hits the button and then how it works? <3> nardev I get that when headers are already sent and you try a header() or cookie setting etc ... <9> it goes into the php code but also runs the html before it but it ...blablbal! <9> ok <9> so i hvae this: header('Location: ' . $_SERVER['REQUEST_URI']); <14> hi <9> andexit(); <9> and people are mentioning the white space after that <9> but what if i have it as a php script and then after it i have html... <3> nardev u can not print anything before a header() <15> !tell danielito about u <9> i see <9> do you mean like echo or any html? <3> nardev yes ... any echo will send a \n\n and you can not modify any headers after taht ... <9> so what if i have a query in php and i want to echo sucessfull if it has done the insert right so i say if() echo good else echo bad and then i say header('Location: ' . $_SERVER['REQUEST_URI']); <16> now can i do a 'global' declaration of a variable? global $var = "some"; seems don't work. i mean, i have a $var = array();, but i can't use it in the mid of a function()
<16> how* <9> how would you avoid the header thing in this scenario? <9> i'll paste it! :) <17> ho do you embed a php fucntion call in javascript? <6> Guest78286: global it in your function <18> What would it do in mysql if, using php, I do mysql_query("UPDATE mybase.mytable SET mycol = '".$myvar."' WHERE ref = xxx"); where myvar is an array ? <19> thanks DavidHKMrPowers <9> here it is: http://pastebin.com/532187 <6> Guest78286" $var = "some"; outside the function <6> Guest78286: global $var; inside the function <19> alainlucas i think that $myvar will return "Array" only, a message error <19> DavidHKMrPowers hmmmm. <18> dark_light: ok <19> DavidHKMrPowers so i must declare the global vars i wanna use on the function? <9> danielito: http://pastebin.com/532187 <19> DavidHKMrPowers i can't set the function as global? <6> dark_light : yes global it in func <19> alainlucas best if you try yourself, i am a bit newbie on php:) <20> hey guys <20> i'm trying to execute gpg in PHP but i'm getting 'permission denied', it seems <20> am i going to have to do some horribly complicated suid stuff now? <19> Edward123 it depends on what you are trying to do :P (it was a question anyway?) <21> Can anyone tell me again why the use of GLOBAL is 'bad programming' ? <22> yes <12> T-Start: side effects. <12> There's no easy way to know if a global has been modified by another part of your code, so it might not have the value you're expecting <19> T-Start i dunno, but what i am trying to do is easier with global <19> schapht hmm <12> There's a time and place for everything. Even globals. Just use caution is all <9> danielito? <12> also, if you're using PHP5, consider a static cl*** member <21> okay, so it's not like there's a chance it'll be deprecated by the time we get PHP7, right ? <12> it works as a global and doesn't bring the possibility of name collisions (also you don't need to say 'global $blah' before using it) <21> schapht, like this right: http://pastebin.com/532065 ? <19> schapht i use one $verify = TRUE; on my index.php, so it calls some stuff like config.php and the config verify the $verify. it begins a problem like the one you said <19> schapht but i know no other forms to prevent users accessing directly the config.php <9> can somebody look at this code and tell me why i get the Cannot modify header information - headers already sent by in the following code: http://pastebin.com/532187 <19> i am not using OO :P maybe someday i will use it <12> T-Start: that looks decent. but function sql should be 'public static function SQL' to be clear <19> nardev you sent some HTML code BEFORE the headers <12> E_STRICT will error otherwise <9> wait <12> other than that, looks fine <19> nardev you must sent the html code after the header, because the header is placed on.. top. :) <23> what?! no OO?! tut tut <12> dark_light: OO in PHP5 really buys you some wonderful functionality. I'd make the effort to use it ASAP. <12> dark_light: fancy that... a header at the top... <9> dark_light: you mean i place the header('Location: ' . $_SERVER['REQUEST_URI']); somewhere else? <19> nardev no, i mean place the header() on the top of the php file <19> like, an <?php before anything <12> nardev: the rule is that you can't call header() after any echo, or print or even text outside <?php ?> <9> guys can you check this page out: http://www.php-mysql-tutorial.com/mysql-php-guestbook.php <21> Thanks, missed that 'public' thing indeed <19> well, i liked OO when i read a ruby faq, schapht, i viewed some code and OO looks fine to me, but.. i just don't know how the sufficient of it <12> dark_light: not sure what sufficient means as a noun.... <19> the other way is more familiar, and i will use it for some time <19> hmmm.. <19> well, i tryied to say the portuguese word "suficiente", hahahaha <12> dark_light: I feel like the real advantage of OOP is that you can eliminate switches and if's with inheritance, which eliminates code duplication <19> hmmm.. <19> enough <19> heh <24> unless the language adds overhead for cl***/object definitions a lot <12> less code duplication means that bugs are likely to be isolated to a single place in your code <15> nardev: Fun stuff... Unless someone decides to disable JS... <12> Bazzi: in most systems that overhead is not the bottleneck. But granted, sometimes it is. <24> well, I dont like the java way for instance <19> schapht it is more readable too. i was looking haskell too, a functional language.. it's a bit crazy.. i am wondering when i will use these complex languages :D <12> Bazzi: you mean the bytecode and what not? <24> no, the actual "coding rules", like 1 cl*** 1 file and such. <25> there is a function taht prints info about a variable. But I don't remember the name... Any help, please? <12> I thought haskell was declarative... <12> beatdown: print_r, var_dump, etc... <25> ok, thanks
Return to
#php or Go to some related
logs:
ogmrip av sync lvm No program realvcn failed to connect runq debian process dyngen: Unsupported ELF class crystal audio ubuntu bicose definition kdebluetooth_experimental handsfree aim: error while loading shared libraries: libstdc++-libc6.1-1.so.2: mozilla-launcher howto
|
|