@# 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 27 28 29 30 31 32 33



Comments:

<r00t> question: is there some way to pipe the output of php scripts running on apache through another program (i.e. a html pretty-printer) before serving it to the client?
<madsara> Thanks
<fires> ah-HAH! grrr. my browser was trying to parse the output so i wasn't seeing it
<fires> that one always gets me
<fires> for some reason
<fires> thanks anyway people
<Dangermouse> r00t: php.net/outcontrol maybe
<||cw> r00t: only if you run it as cgi, but that would still a lot of effort. you could just code your app to use the tidy extention
<r00t> Dangermouse: thanks, that's looking good
<||cw> r00t: you'd still need to add code and use tidy
<r00t> ||cw: well, i'm outputing xml, and don't want to have to worry about formatting, so i want to push stuff through an autoformatter for easier testing
<||cw> but ob + tidy would be the easiest way to do it to exsisting scripts
<r00t> (yes, i will switch to using an xml library later)
<arpegius> myFunction returns $myURL, which = "http://www.".$myArray[$randomNumber].".com";. the variable constructs fine outside of the funciton, but when its within a function it doesnt seem to process the array part
<Else2> hi
<madsara> Hmmmm, Pollita that regex doesn't seem to work with preg_match
<||cw> arpegius: not enough info. post a sample script on a pastebin site
<arpegius> http://pastebin.com/575621
<||cw> madsara: try without the leading s
<arpegius> if you take the contents of getRandomSiteWord and parse it outside of the funciton, then echo $albumURL, it works
<ShuaiKing> Hi
<ShuaiKing> What does the parse error "unexpected T_ECHO" mean?
<ShuaiKing> Code: echo "Your request has been processed. Query: <br></div><code>" . echo $_POST["text"] . "</code>";
<||cw> arpegius: $siteStockcontent doen't exist int eh scope of that function, only globaly. access it like $GLOBALS['siteStockcontent']
<arpegius> ShuaiKing http://www.keithjbrown.co.uk/vworks/php/php_p7.php might help. scroll down a little.
<||cw> arpegius: php functions have thier very own scope and inherit nothing
<||cw> you could also p*** the content in as a param, which would probably be more usefull in the long run
<arpegius> ||cw p*** $siteStockcontent you mean?
<||cw> yeah
<arpegius> i get it. let me try that out.
<arpegius> bah. dammit. gotta go find an apartment instead :-D. ||cw would it be something like getRandomSiteWord($usecontent) { ... $usecontent ...}. then call the function w/ getRandomSiteWord($siteStockcontent)?
<||cw> yeah
<arpegius> beautiful
<b1n0ry> ShuaiKing: it means you have an echo statement somewhere that it doesn't belong.
<wal0Z> pizza 4 fromage ?
<b1n0ry> ShuaiKing: and from the description of your error, it should be quite obvious where that echo statement is
<b1n0ry> mmmm pizza. i think i'll have pizza tonight.
<wal0Z> :)
<Stormchaser> 4 cheese pizza. Ick.
<b1n0ry> not a cheese fan. i like cheese on a pizza but gotta have meat.
<Arafangion> And jalapenos
<b1n0ry> jalapenos are good, too
<b1n0ry> bbq sauce, bacon, pepperoni, and cheddar... yum
<kidzer> Hi folks, forgive me for intruding - y'all seem fairly knowledgeable with PHP - tell me, how did you go about learning it?
<b1n0ry> kidzer: reading the manual, books, examining other people's code
<Arafangion> kidzer: Well, we start talking about pizza, and eventually the convo just drifts onto php. So you might say we learn it by discussion.
<mattmcc> Apply knowledge of other languages.
<b1n0ry> yeah, that's a biggie. apply knowledge of other languages.
<b1n0ry> sure does cut down on learning time.
<Arafangion> Definetly.
<kidzer> my only other knowledge of language is fairly basic HTML, haven't used it in ages so its rather rusty
<b1n0ry> it helps if you can just say "how do i define a cl*** in PHP" rather than "what's a cl***?"
<mattmcc> Programming is just concepts. Languages don't change the concepts, they change the syntax.
<Arafangion> kidzer: HTML is a markup format, NOT a language.
<b1n0ry> actually, HTML = HyperText Markup (Language)
<kidzer> Oops, sorry. I always thought of it as a language
<kidzer> my bad
<Arafangion> b1n0ry: imho, it's a confusing use of the term "Language".
<myc> b1n0ry: there have been things with less descriptive lanes.
<b1n0ry> though i do agree with you in concept. html is not a programming language, it is a formatting language.
<myc> names*
<Arafangion> b1n0ry: XML is much closer to a language than HTML is, imho.
<b1n0ry> i would agree
<mattmcc> I'm not sure what the rationale there would be.
<Dangermouse> lol
<mattmcc> XML is a meta-markup language, while HTML is a markup language.
<mattmcc> That is, XML only defines the rules which one uses to create a markup language.
<b1n0ry> kidzer: first, get yourself a book on Object Oriented Programming or beginners programming concepts to learn the concepts. once you learn the concepts, everything else just becomes syntax.
<ShuaiKing> Yo dudes
<Arafangion> mattmcc: Well, one can extend and fit XML to describe whatever they like. (That's the idea, anyway)
<ShuaiKing> I'm trying to do something like this:
<ShuaiKing> echo 'Your : <br><code>' . echo $_POST["text"] . '</code>';
<ShuaiKing> Does the "." put those things together?
<b1n0ry> Shuai: get rid of the second echo you don't put a command in a command
<olleolleolle> ShuaiKing: Drop the 2nd echo call. (hehe, we help fast here)
<ShuaiKing> That might be giving me the T_ECHO?
<b1n0ry> ShuaiKing: echo 'Your: <br><code>'.$_POST['text'].'</code>';
<olleolleolle> The dots are "string glue".
<b1n0ry> ShuaiKing: T_ECHO = you have an echo where it doesn't belong


Name:

Comments:

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






Return to #php
or
Go to some related logs:

change screen resolution ubuntu dapper
#web
debian apt-get java-package 0.25
php fseek
pyserial logger
#css
gentoo kdm_greet Internal error: memory corruption detected
#perl
ubuntu-desktop adept BREAK
chvt setuid



Home  |  disclaimer  |  contact  |  submit quotes