| |
| |
| |
|
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:
<tama00> im in australia <TML> tama00: I'm quite certain you can find a service like that in Austrailia. <TML> Artnez: More importantly, we, the documentation team. <tama00> TML, what if i can get a company to publish the pdf.. <TML> tama00: Then do so. <Artnez> gangster`s: what problem are you having <TML> tama00: But you can't make a profit off it, or you'll likely get sued. <TML> tama00: Unless you add enough filler content to make it a derivative work. <tama00> im sure many people will buy it, having a hard copy is much better then staring at a screen and alt tabbing windows <tama00> TML, i dont wanna make a provit of it, i just wanna book to read <TML> tama00: Which is where the PHP books that exist come in. And they go for something like $50 USD on average. <deadroot> tama00: i'm happy with alt+tabbing <lietu> I think it's easier to "alt tab windows" than to have a huge book in your lap/desk/in front of your screen blocking your view/whatever <p0windah> tama00: I wouldnt, the comments are as important and the strict definitions <p0windah> as the strict.. <lietu> and even easier to look at the online doc on a laptop next to the computer yer actually coding on <TML> tama00: You'll almost certainly be hard-pressed to find a publishing house that will print it for you without expecting a profit. <gangster`s> Artnez: simple... i'm triing to create a script that uses same file for displayiing wml content and html content (wml for mobile phones) <TML> tama00: But if you can, good for you, knock yourself out. <tama00> TML, yeah u got a point there.. <Artnez> gangster`s: you getting an error of some sort? <tama00> fine ill get the god damn pdf <gangster`s> Artnez: no... but if i'm triing to open the page from mozile, ir tries to download it if i open with a wml browser i can see it <gangster`s> Artnez: http://pastebin.com/574586 <Artnez> line 12 is your problem <Artnez> check($user_agent); <Artnez> should be $user = check($user_agent); <Artnez> *$usr <gangster`s> okn let me try <gangster`s> .. ok <gangster`s> ... nop... same error <lietu> tried putting a couple of echos in there? <TML> gangster`s: Either seperate your headers, or call header() once for each header <lietu> as in, between line 5 and 6, "echo 'browser'" and between 7 and 8 "echo 'mobile'" <Artnez> gangster`s: try this: http://pastebin.com/574595 <Artnez> well that wont fully work, but its a start <Artnez> i gotta get to bed ... 4:19am isnt healthy <Artnez> night <TML> gangster`s: And instead of trying to guess based on the useragent name, why not let the client's "Accept:" header tell you which content-type to deliver? <gangster`s> TML: any link refernece for that? <TML> gangster`s: For what? <lietu> you could ofcourse see if there was a problem with that variable p***ing/your if-line by testing http://pastebin.com/574598 <lietu> and then figure out that "Accept:" thing <pisi> Hello. What is the best way to do http(s) requests with php and also get access to headers returned by the remote server ? <pisi> fopen doesn't seem to be the thing.. <TML> pisi: fopen most certainly *is* "the thing". <pisi> TML: how do i get access to headers returned by remote peer ? <kuja> The Thing, isn't that a Marvel thing? :) <gangster`s> TML: do you refer at $_server['HTTP_ACCEPT'];? <TML> gangster`s: Yes. <hxu> The php 5.1.2 I built did not install a `libphp5.so` for me. <TML> pisi: Depends. Which version of PHP Are you using? <hxu> What did I miss in my ./configure command? <gangster`s> ok <pisi> 4.3 <TML> hxu: Because you didn't ask it to. <TML> hxu: --with-apache or --with-apache2 <hxu> TML: Thanks <TML> hxu: May I suggest you actually *READ* ./configure --help? <pisi> as I'm making example code for a client request it would be nice if it worked with as many php installations as possible. <TML> I realize reading is out of the question for many of you. <TML> But I'm going to suggest it anyway. <TML> pisi: Well, you have to do it differently before 4.3.x and after. <TML> pisi: >=4.3.0, use stream_get_meta_data($fp); <TML> ***uming "$fp" is the resource fopen() returned. <hxu> Reading English docs really makes me feel tired. <TML> Prior to 4.3.0, use the magic variable $http_response_header <hxu> TML: I didn't find --with-apache2, it --with-apxs2 what I need? <raar> I'm trying to use trinary operator, how would I do this?: return chk_login() ? menuBox("Logged in","<a href=\"logout.php\">temp</a>") : menuBox("Login",boxLogin()); // if chk_login() returns true I'd like the first menuBox, if not: the second (after the : ). I'm getting "parse error, unexpected T_IF, expecting '{'". Could you help me please? <TML> hxu: That may be it. As I don't use apache 2, I'm hard pressed to tell you the precise command. I'd have to read ./configure --help <kuja> raar: It's "ternary", and also, you have an 'if' where it shouldn't be. <hxu> TML: But my mother tongue is not english. I'd like to real Chinese version of ./configure help. <TML> hxu: And I'd like a million dollars. <kambei> TML: Do you know JSP at all? <lietu> I'd like a brand new pontiac <TML> kambei: Somewhat. <kambei> TML: What would you say are the key advantages of PHP over JSP? <lietu> well, no, I don't really want a pontiac <TML> raar: Try adding parens for readability and forcing precedence. return ( chk_login() ? (thing1) : (thing2) ); <kambei> TML: If you would say, that is. <TML> kambei: PHP isn't Java would be my #1 <kambei> heh <kambei> Yeah, I like PHP that way. <raar> okay, thanks guys :) <TML> It's one of the reasons I don't use PHP5. Certain members of the dev team confuse "good" with "Java-like". <kambei> TML: What, in particular, do you dislike about PHP5? <TML> kambei: php.net/oop5 <TML> Pretty much everything you find there. <kambei> I see. <TML> It'd be easier to say what I *like* about PHP5. SimpleXML isn't too bad, as those things go. They cleaned up some odd behaviours in the parser in relationship to ::. <TML> That's about all I can think of offhand. <kambei> I appreciate the input. <raar> http://pastebin.com/574613 - cleaned up, what am I doing wrong? will I best be off with another operator for this kindof statement? If so, which one? <raar> Of course I could use an if statement, but I'm guessing it's not the ideal solution <TML> raar: I don't think that ternary expression is your problem. Pastebin your code. <raar> okay <pisi> TML: manual doesn't say that i can access headers via this meta_data thing.. <TML> pisi: Yes it does. <pisi> ok, sorry <pisi> appendix m <raar> http://pastebin.com/574621 <pod> I'm having some trouble with getting my mind around using a db connection in a cl*** ... <pod> do I p*** a db connection to an object? <jgonzalez> hi <pod> do I use a singelton pattern? <jgonzalez> one question about "global" <pod> How do you guys feel about this sort of thing? <TML> raar: You forgot a "{" after chk_login() <jgonzalez> if i have a function that i want to p*** a var <jgonzalez> that is a global var <jgonzalez> why can't i use function(global $var1,$var2) ? <TML> jgonzalez: myfunc($var); <pod> jgonzalez, if it's global then you don't need to p*** it ... but I stay away from global. <TML> jgonzalez: Because that's not how PHP function signatures work? <pod> jgonzalez, function () { global $var1; } <TML> jgonzalez: If you're going to P*** it to the function, you don't need to use global. <TML> function foo($var) { ... code refers to value as $var ... } foo($globalvar); <gangster`s> tml: i can't see the wml content into the wap browser <raar> Ohh, thanks muchly, TML! - it works now :) <pod> TML, if you used a db object in another object, would you p*** it or use a singleton pattern? <TML> pod: Depends on the application <pod> say ... for instance I have an object of "User" which basically only uses a db connection to get/set the user object ... <hxu> I installed php-5.1.2, and restarting httpd service encountered error: Syntax error on line 190 of /etc/httpd/conf/httpd.conf: <hxu> Cannot load /usr/lib/httpd/modules/libphp5.so into server: /usr/lib/httpd/modules/libphp5.so: undefined symbol: sqlite3SelectDelete <gangster`s> TML: text/xml,application/xml,application/xhtml+xml,text/html; is the $_SERVER['HTTP_ACCEPT'] result <TML> gangster`s: I submit to you that your WAP browser is a piece of junk that doesn't follow the HTTP specification. <TML> :) <gangster`s> :))) <pod> gangster`s, application/vnd.wap.xhtml+xml is XHTML-MP, application/xhtml+xml is XHTML-BASIC support and text/vnd.wap.wml is WML... <TML> If it accepts text/vnd.wap.wml but doesn't send that on the "Accept:" header, you have a problem. <pod> gangster`s, if you're using firefox they have extensions to support XHTML-MP and WML ... <four_eyes> hi anybody can help me with php+mysql and mod rewrite ! <mjec> four_eyes: ask away <four_eyes> ok <TML> pod: He has some code that's trying to use browser sniffing to choose the content type. I suggested he use the Accept: header, but his WAP browser appears to violate RFC 2616 on the matter. <pod> TML, is that the browser on his mobile? <gangster`s> tml.... can you give me the syntax? maybe i was wrong... in my <four_eyes> mjec: i have an url view_content.php?title=Rape+Victims+Speaks+Out <gangster`s> script... <four_eyes> in .htaccess i put RewriteRule ^view_content/([^/\.]+)/?$ view_content.php?title=$1 [L] <pod> gangster`s, is that the browser on your mobile, or a browser emulator you're using for development? <TML> four_eyes: Get rid of mod_rewrite and turn on MultiViews. <four_eyes> but when i try to see view_content/Rape+Victims+Speaks+Out/ it doenst come <mjec> four_eyes: and what's your query string? <four_eyes> database query script inside the view_content.php ? <mjec> no, don't mind that question <mjec> four_eyes: try removing the leading ^, it's not necessary <TML> four_eyes: "Query string" in HTTP parlance means "Stuff after the ? in your URL" <four_eyes> its $row_content['title'] <TML> Or, more loosely, it can mean "the URL itself" <mjec> TML: I was referring to the latter - that which follows GET, really
Return to
#php or Go to some related
logs:
ebuild e_modules #web #ldap #physics #gentoo #lisp gentoo oldconfig ati-drivers #suse php5-session suse 10 totem pluggins
|
|