IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-04
[19:28]<mz_2gzygggz>thx
[19:28]<sxr2rw>Hello all
[19:29]<sxr2rw>http://pastebin.com/757853
[19:30]<sxr2rw>If you look at lines 47 to 51 How can I get those line to print/echo without the spaces.
[19:31]<dzzznzdjusn>Shaba1: What spaces?
[19:32]<sxr2rw>Dangermouse when those lines are printed to the file the output has spaces between each line.
[19:32]<sxr2rw>I want all the lines to be on one line but not to have to change the code.
[19:32]<dzzznzdjusn>Delete the space then
[19:32]<dzzznzdjusn>Er. hah
[19:33]<sxr2rw>LIke I just said Dangermouse
[19:33]<sxr2rw>that woudl cause on very big unreadable line
[19:33]<dzzznzdjusn>You're concerned about readability?
[19:33]<vnsvycrffs>is anyone else having an error, when they run the first example: http://us3.php.net/manual/en/language.oop5.overloading.php .. i get a Fatal Error: Call to a private method ....
[19:35]<sxr2rw>Did you look at it Dangermouse?
[19:35]<dzzznzdjusn>Shaba1: let me try and tidy it up for you..
[19:36]<sxr2rw>I would like to keep it readable
[19:36]<sxr2rw>but at the same time have it be able to run
[19:36]<dzzznzdjusn>..you mean make it?
[19:36]<pjffyvr>Yesterday: #50,924 in Books
[19:36]<pjffyvr>sweet
[19:36]<pjffyvr>Broke the top 100k
[19:36]<dzzznzdjusn>Pollita: link?
[19:37]<pjffyvr>There's a proper link off my blog (too long to recall off the top of my head)
[19:37]<pjffyvr>http://blog.libssh2.org
[19:37]<dzzznzdjusn>ok
[19:38]<dzzznzdjusn>Shaba1: http://pastebin.com/757875 I think thats the output you want, might need changing slightly
[19:39]<dzzznzdjusn>http://pastebin.com/757880
[19:40]<dzzznzdjusn>Pollita: Where am i looking?
[19:42]<dzzznzdjusn>"Buy my book" is not a link and there's nothing below it :/
[19:57]<mz_2gzygggz>how do i save myself from the ' debacle on strings when inserting into database?
[19:57]<pjffyvr>*_escape_string()
[19:58]<pjffyvr>e.g. mysql_escape_string()
[19:58]<mz_2gzygggz>ok.. thx
[19:58]<zzlzm>or use prepared statements
[19:58]<pjffyvr>nod
[19:58]<mz_2gzygggz>what's weird is that .. i gathered that string from the database
[19:58]<pjffyvr>prepared statements are even better
[19:58]<mz_2gzygggz>and i put it straight away into the new line
[19:58]<mz_2gzygggz>what is that?
[19:58]<zzmzjzmnz>prepared statements?
[19:58]<vnsvycrffs>you using phpmyadmin?
[19:58]<mz_2gzygggz>yes
[19:58]<zzmzjzmnz>isn't it in perl
[19:58]<dzzznzdjusn>Not just Perl
[19:58]<zzmzjzmnz>:)
[19:59]<mz_2gzygggz>phpadmin it is
[19:59]<vnsvycrffs>that's why, look at the value, they use two quotes for some reason... ''val''
[19:59]<vnsvycrffs>it's suppose to be double quotes "val"
[19:59]<mz_2gzygggz>well
[19:59]<pjffyvr>$p = new PDO('mysql:host=localhost;database=foo','user',pass'); $stmt = $p->prepare('INSERT INTO foo values(:1,:2,:3)');
[19:59]<mz_2gzygggz>i use '
[19:59]<mz_2gzygggz>and it came up as ' too
[19:59]<mz_2gzygggz>so i wont blame them
[19:59]<pjffyvr>$stmt->bindParam(1,$_POST['data']); ...etc....
[19:59]<pjffyvr>$stmt->exec();
[19:59]<mz_2gzygggz>do i have to include something?
[20:00]<pjffyvr>That syntax might not be precisely correct, but it's in the neighborhood
[20:00]<pjffyvr>da: You need PDO support compiled in
[20:00]<zzmzjzmnz>$stmt->exec(1, ...) might do it I gues, is pdo comes w/ default install of php(5) ?
[20:00]<pjffyvr>Which is default on 5.1.0 or greater
[20:00]<pjffyvr>w/ 5.0.x you can do: pecl install pdo
[20:00]<zzmzjzmnz>more php is like perl, more I like php :)
[20:01]<pjffyvr>You also need to appropriate DB driver of course.... e.g. pdo_mysql
[20:01]<pjffyvr>Heya Davey
[20:01]<mz_2gzygggz>pdo...
[20:01]<pjffyvr>We were just browsing your flickr
[20:01]<mz_2gzygggz>dont think i can do that with a shared server
[20:01]<dzzznzdjusn>Blaming you for Pollita getting her picture taken
[20:01]<pjffyvr>da: Not if the host doesn't have it installed, no
[20:07]<gbzglzgsggv>does php have a function to print_r all of the current variables?
[20:07]<dwrxrnf>does anyone here host with layeredtech.com ?
[20:08]<sugmnv>i think there is a var_dump() or somethi g
[20:09]<dzzznzdjusn>NBrepresent: All? print_r($GLOBALS);
[20:09]<vrgnnvvy>hello
[20:10]<gbzglzgsggv>Dangermouse: thanks.
[20:10]<vnsvycrffs>have i ever told you guys that i love PHP?
[20:11]<vrgnnvvy>I have a problem with apache + php and mass virtual hosting... the $_SERVER['document_root'] doesn't return the good value ...
[20:11]<vrgnnvvy>have you an idea ?
[20:25]<dwrxrnf>one that is good for customers using cc's
[20:25]<dwrxrnf>not just a test one
[20:26]<pjffyvr>They're all about the same
[20:26]<pjffyvr>Just don't use verisign (crooks) or godaddy (idiots)
[20:26]<dzzznzdjusn>lol
[20:27]<dzzznzdjusn>But their marketing: "VeriSign offers the strongest SSL That's a fact."...so tempting!
[20:27]<pjffyvr>"Strongest"
[20:52]<gbzglzgsggv>the hide/show is done with javascript, and it's working fine
[20:56]<gbzglzgsggv>how embarrassing. heh.
[20:57]<gbzglzgsggv>i made some changes and it's still not working.
[20:59]<gbzglzgsggv>this is current: http://perry.pastebin.com/758054
[20:59]<pdznpfd_>Can anyone think of a reason the regex /<p class=g><a class=l href="/ would result in no matches when there quite clearly should be plenty?
[20:59]<pdznpfd_>Did i forget to escape some character or something? I'm pulling my hair out
[21:00]<pdznpfd_>Using preg_match_all, by the way
[21:00]<azdjzyaas>Why should there be plenty of matches? ...Unless your code has that exact phrase.
[21:00]<pdznpfd_>It does
[21:02]<fa2unsax>if you are looking to replace exactness, use str_replace instead
[21:02]<pdznpfd_>...
[21:03]<pdznpfd_>I'm not
[21:03]<pdznpfd_>I just don't see why that regex doesn't match
[21:03]<azdjzyaas>Try stristr if you want case-insensitive substrings.
[21:04]<azdjzyaas>That looks... too non-regex-y for a regex.







