14.07.2009
Channel php ausgewählt, Log vom 14.07.2009
Seite: < 1 2 3 4 > Letzte Seite
Chatlog
opal_froot: by dumping all vars
rh: unserialize -> array -> work with it :>
opal_froot: yup that works for a single array
opal_froot: however the mysql result obj is an assoc array
opal_froot: if I have to put the entire object into serialised array format then cool - but I just wanted to store the object and query it when I needed to - that would have been very convenient
rh: aXn-WonderKid^o: or try dirname(__FILE__); for PHP >= 4.0.2
Rutix: If you dont close a php file with the tag ?> what happens then? or is it permitted?
opal_froot: will fail
aXn-WonderKid^o: i've tried to look on php.net but cant get a result? (dirname)
Rutix: opal_froot but i have seen php files who dont do it and work fine :\
rh: http://www.php.net/dirname ? ;)
opal_froot: scandir
Rutix: i even heard that the ?> can mess with session management if you got an extra space behind the ?> on some servers
aXn-WonderKid^o: yeah, that page -
aXn-WonderKid^o: and currently my code is like this: <?php $dir=dirname($_SERVER['PHP_SELF']); $echo $dir; ?>
daedeloth: define ('BASE_PATH', dirname(dirname(__FILE__)).'/');
daedeloth: that's always correct :)
daedeloth: (gives you the directory above the current directory by the way)
Rutix: so anyone any thought about not using ?> at the end?
daedeloth: yea, it's evil.
Rutix: and why is that :P
daedeloth: well, it doesn't look right to me, bu a lot of people do it :)
Rutix: well yea im more concerned if it can cause bugs or w/e :\
daedeloth: I don't think it will cause bugs, people generally do it to prevent bugs ;)
Rutix: :) alright
daedeloth: so, memory hole debugging. How?
Wannabeuk: I just wanted to check, as untill last night i was unaware of the security issues with php_self, if i pass it through htmlspecialchars would that solve the issue? or would it need extra steps still?
cipe01101: hi, any1 knows how to get images i redirect via htaccess to "pics.php?filename=" cacheable
cipe01101: i already set in php file the expire things, but wont help at all
tobywoby: http://codepad.org/IQxFmV3i how can i get it to remove the aswell as taking the tags out?
@raz0: Wannabeuk, security issues?
Wannabeuk: yeah, the fact is xss vunerable
@raz0: How?
Wannabeuk: with path_info, users are allowed to add to the $_SERVER['PHP_SELF']
Guest_890: hi
Wannabeuk: so it becomes user submitted, so using it as a form action, means its xss vunerable (from what ive read anyway)
tobywoby: how can i make an array for "1. song1, 2. song2.......) but the song changes but the number stays the same?
Wannabeuk: raz0 perhaps this can explain better than me : http://www.mc2design.com/blog/php_self-safe-alternatives
Guest_890: hi, i want to write a cron job using php. in that it will wait for some time and restart the execution. any body help me
tobywoby: whats wrong with this: $index2 = str_replace($nbsp, " ", $line);
tobywoby: $nbsp = " ";
@raz0: Wannabeuk, Interesting. Didn't know that.
Wannabeuk: didnt know myself till last night, and ive been using that quite a bit
vybz: i leave action blank lol dunno if tas a good idea
DP|Ekklipz: Anyone wan't to help me with some simple PHP-script tutorials?
@Progman: DP|Ekklipz : http://tut.php-quake.net/
tobywoby: echo "Hellow World!";
XippY`LikWydd: ^^ thats all u need to know
opal_froot: does anyone know of a cast iron way to tell is a get or post variable exists ?
opal_froot: tried isset
@Progman: and isset is working
@Progman: if (!isset($_GET['id'])) { echo 'no id value in the url found :('; }
opal_froot: nope
@Progman: it does
@Progman: maybe you use it wrong
opal_froot: that doesnt work for me
opal_froot: ppossibly
opal_froot: always reports that its set
@Progman: how did you use it?
opal_froot: have to do both isset and value!=null
@Progman: no, just isset()
opal_froot: if(!isset($_GET['var']){//do the default}
opal_froot: missing a )
@Progman: works without any problems
opal_froot: k will have another stab
opal_froot: think it might be something to do with xampp and centos
opal_froot: I mean some difference in the way they handle post/get data
d0tt: "If nothing is set in the address bar, the value of $_GET['n'] will be NULL, not ""(empty string) or false."
d0tt: If that helps :P
xert: d0tt: it won't be NULL; it will not be set.
Seite: < 1 2 3 4 > Letzte Seite
Zurück zur ÜbersichtWebseiten Tipps
Hier gehts zum jquery Tutorial.
Meine schwarze Webseite: iPhone4Spiel
