@# 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



Comments:

<0> preg_match("/<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"(*.?)\" /\>/", $in, $matches);
<0> what about that?
<0> Warning: preg_match() [function.preg-match]: Unknown modifier '\'
<1> hi
<2> sedeki, you've a non-escaped delimiter in your regex
<1> http://pastebin.com/759536 -> no error msg, screen empty ?
<2> sedeki, and I'm yure you mean .*? and not *.?
<2> GNeRaL, what's the point of line 2 ?
<0> colder preg_match("/<input type=/\"hidden/\" name=/\"__VIEWSTATE/\" value=/\"(.*?)/\" /\>/", $in, $matches);
<0> how about that?
<2> sedeki, even worse
<3> Take out the escaping and change your delimiters to #. If you want anything between the " and " use (.+)
<0> preg_match("#<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"(.+)\" >#", $in, $matches);
<0> like that?
<3> preg_match('#<input type="hidden" name="__VIEWSTATE" value="(.+)" >#', $in, $matches) would be easier
<3> probably want to remove the space at the end, between " and >?



<0> ... />
<3> ah
<3> Microsoft does XHTML? Wow ;)
<4> hello
<4> I'm having a strange problem...
<0> what?
<4> I'm running a program (using system()) which takes parameters using env variables
<4> so I use putenv("frame=$i"); in a loop
<4> it's working fine till frame=9
<4> then it stops working - frame env keeps being 9
<4> loop goes from 0 to 99...
<2> sedeki, no, you really need to keep using ? in this case.
<5> PovAddict: paste the loop code
<4> hang on, removing useless stuff
<6> *pastebin
<5> yeah, sorry..what I meant
<7> hello everybody
<4> I removed other stuff and env var is set correctly :|
<5> overwriting the var somewhere?
<4> I'm setting verbose=1 and then in a loop frame=$i
<4> after frame=9, it starts setting verbe=$i :|
<4> first 4 letters of verbose + 5th letter of frame :|
<8> sockets question: when reading from socket how does socket timeout work, will an fgets wait for timeout length per attempt, or timeout is the time allowed for repeated fgets attempts, such as in a loop?
<2> professorchen, the timeout will be per attempt, or every socket would be dead sonner or later ;)
<9> does php's TRUE/FALSE translate to NULL on FALSE, if i do a if (condition_is_true) [not (condition == true)] ?
<2> m-00kie, err ?
<9> or does it translate to 1 and 0 which would make (condition_is_true) always true?
<4> if(something) something has to be TRUE or FALSE
<4> not NULL for the condition to fail
<2> if (condition == true) is the same as if (condition)
<9> well i encountered some instances in PHP where it actually saw FALSE as 0 which translated to always true in that syntax
<4> 0 will translate to false *looks for link to docs*
<9> no it wont..
<2> m-00kie, yes, because PHP supports cross-types comparisons
<8> sockets question: does timeout have an effect if socket is set to nonblocking, or does it apply to blocking sockets only
<10> .oO( NULL is no boolean )
<9> well from what I've experienced, PHP translates NULL as false
<11> does anyone know of a good cl*** and/or way of unserializing session data and then serializing it again
<2> m-00kie, yes.
<4> http://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting
<11> (serialize and unserialize does not work, as it does not appear to be in a compatable form)
<10> sslashes: serialize() unserialize()
<9> so if i have $myvar==false; then if ($myvar) should fail?
<9> er.. $myvar=false;
<4> yes
<11> SEAwolfx: those functions do not seem to work on session data
<2> err ?
<4> absolutely
<4> $myvar = (a != 3); would put TRUE or FALSE on $myvar
<4> comparison operators (==, !=, <, >, etc) evaluate to a boolean
<11> it returns an error: Notice: unserialize() [function.unserialize]: Error at offset 0 of 14 bytes in...
<10> sslashes: imho php uses these functions to save session data.
<12> Hi !
<9> ($myvar) has no operator. I think it's the same as defined($myvar)
<3> no
<12> $_SERVER['SCRIPT_FILENAME'] give me the full path to teh script .. but i only need the name of the script .. nothing more .. hwo to ?
<13> __FILE__
<10> sslashes: if the session data are stored to database you have to be careful with the '/'-sign which has to be escaped for storing into a table.
<4> m-00kie: if($myvar) will convert $myvar to a boolean
<3> sslashes: Are you unserializing properly serialized data?
<13> flaccid__, echo basename(__FILE__);



<9> ok thanks
<11> SEAwolfx: serialize($_SESSION) returns a:1:{s:3:"foo";s:3:"bar";} while echoing the peramiter given to _write (a custom session handeling function of mine) is foo|s:3:"bar";
<11> id does not seem to be a correctly serialized string
<12> ok and how to remove the .php at an ending of a string ?
<2> sslashes, yes, that's corect, it's not the session array that gets serialized, but each variables
<10> sslashes these strucure seems to be right.
<13> flaccid__, str_replace('.php', $filename);
<2> varname|<serializedvalue>
<11> colder: ahh, ok, thanks
<2> that's why you can't use any | in your session variables' names ;)
<14> hey guys... this is more of a design question regarding the MVC pattern... im implementing a user management system, where theres a table of users screen and a screen to add/edit user... from the design prespective would the table that lists the users and the view where you are edting or adding a user be all separate views? and hence be in their own sep files?
<4> http://pastebin.com/759668
<4> it's working very strangely...
<4> not sure if it will work the same strange way on Linux...
<4> but looks like a PHP bug
<4> first 9 iterations of loop set frame=$i
<4> from #10 to last, it sets verbe=$i :\
<15> What is a "Missing Argument n for function"?
<15> N being a number, function being the name of a function...?
<4> you called a function with less arguments than required?
<15> You'll have to excuse me, but I'm a relative PHP newb...
<15> What does that mean?
<4> what function is it?
<15> submit_post()
<15> >_>
<15> Not that that helps.
<4> ohh so it's one you defined yourself..
<15> Yes.
<4> well, if you declare a function as: function foo(a,b) { whatever }
<4> and you call it as foo(42); you are missing one parameter
<15> There's two Missing Argument warnings, and then a fatal "Call to a member funtion on a non-object" error.
<4> if you solve the missing argument one, the fatal one may go
<15> It would be foo(42, life)
<4> exactly
<15> Ah.
<15> Alright.
<4> requires two parameters, so you should call it with two parameters
<15> And the 'n' number... it refers to the function place?
<15> Like, the first function in the app is 1... then 2...
<4> in the example I gave, it would say 2
<4> because you are missing the second argument
<15> Ahh right.
<15> Mmmkay.
<4> :)
<4> soo... can anyone help me with those damned environment variables getting set randomly?
<16> does $_FILES['fleImage']['name'] also get the extension?
<2> fightingfriends, TIAS
<16> TIAS?
<2> Try it and see
<4> well, if it gets the filename, why shouldn't it get the extension?
<16> because it's a bastarD?
<4> remember that on Linux there isn't even an 'extension' concept, it's part of the filename like all the rest
<16> I've never used linux before
<4> you can have a filename called 'foo' and another called 'foo.bar.test.asd'
<16> ah right
<4> doesn't matter, in Windows since Windows 95 you can also have a foo.bar.test.asd file
<16> so the short answer is yes
<15> Yep.
<15> =D
<4> and the long one is, extension is part of the filename and isn't handled separately
<16> thank you
<4> soo... can anyone help me with those damned environment variables getting set randomly?
<4> looks like a PHP bug
<4> http://pastebin.com/759668 <-- TIAS :P
<4> I have no idea where the 'verbe' env variable comes from... looks like first 4 letters of 'verbose' + 5th letter of 'frame' = some memory problem on PHP...
<17> hi all
<17> how can i add additional things to dsl with the maximum flexibility? ie. i want to add scite (the latest version) the latest firefox etc. do i just tar it up adn put into a mydsl folder in the iso?
<18> hi, could anyone give me some constructive criticism on this pastebin? http://perry.pastebin.com/759688
<17> opps - dumb*** that i am :)
<18> it's just a little link organizer script i've been working on, but i'm sure it could be done with cleaner code
<17> sorry!
<4> lra_: wrong channel? :P
<17> yep!


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#math
eucliedean distance tutorial
#math
no video source found tvtime
tivoli rwxrwxrwx
dvorak translator
qmail [root@localhost ~]# telnet localhost 143
fiberchunks
perl tnet.no tech
#gaim



Home  |  disclaimer  |  contact  |  submit quotes