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



Comments:

<0> kuja@shugotenshi:~/tests/php$ php -r 'cl*** Foo { const BAR = "baz"; } echo Foo::BAR;'
<0> baz
<0> ||cw was confused, Aap :)
<1> so if you use static yoyu have to $?
<2> i never knew that :O
<1> i don't think i've been doing that
<3> yes because he gives: Parse error: syntax error, unexpected '=' in /home/quaggagui/www/router.cl***.php on line 46
<4> if($_SERVER['REMOTE_ADDR']=='111.222.333.444') { header("Location: http://www.pr0n.com";); }
<4> =]
<2> nah
<2> send them to disney
<3> :p
<4> i was gonna say disnet
<2> :D
<4> but unexpected pr0n is always better
<2> lol



<1> na send them to tubgirl
<2> :O
<2> lemonparty
<2> :P
<4> yeah f0 sh0
<0> ||cw: Well, PHP4 doesn't have static variables. PHP5 does. In PHP4, all you had was static methods.
<3> this is really ****, because i need it real fast
<5> Hello, think i need some help with regexp... At the moment im using an str_replace like this(php): str_replace($key, '<img src="img/'.$value.'">', $replace_hand); The thing is that i only want to replace $key when its inside [ ], and it cant be more than 10 blankspaces from [ and same with ] ... Any ideas? :)
<3> so nobody can help me?
<0> Aap: I'm not quite sure I see what's wrong with that code.
<0> Mine works, definitely.
<1> gimmulf_: use regex
<1> Aap: I still haven't see the code that calls the cl***.
<0> ||cw: Router::getInstance()
<0> Well, that's the method, not the code :)
<1> no, the ACTUAL code, all of it
<5> ||cw: yes i know that :) but what would that regex look like
<3> how do you mean??? this is the singleton cl***, i have 10 more cl***es that use them
<0> gimmulf_: Learn?
<3> i can't give them all
<0> Since when were we the regex coach =P
<5> no time for that, thanks for your help
<1> like, if there are any loops, or functions, is scope an issue, and so on
<2> lol
<3> i'll check for loops
<0> gimmulf_: So you never even *though* at all of making the tiny effort?
<0> s/though/thought/
<1> for weird **** happening, you can'd find a solution without the whole code
<2> lol
<5> i dont think its a tiny thing to learn regex
<1> Aap: can you make a simple test case that exibits the problme?
<2> but you could start
<3> but the thing is: if there are loops , it can only ask for an instance
<0> php.net/pcre.pattern.syntax -- sure makes it look tiny.
<2> that's not too difficult gimmulf_
<6> is there a way to change the smtp server in a php script in linux ? ini_set is windows, correct
<1> gimmulf_: it's not if you want to learn all of regex, but you don't need all if it. it's definatly worth your time to do it anyway
<2> ini_set is php
<6> for sendmail
<2> it'll work on php/linux
<1> jaybuffet: mail() on linux uses the sendmail binary, not an smtp server
<1> if you want to change how that behaves, you have to do it in your local MTA
<7> I thought sendmail was an smtp server
<8> It is
<9> when i do an echo of the $_FILE variables i get a blank output for type and tmp_name, the size is 0 and error is 2...
<1> most linux mail server have a sendmail command
<6> what would ini_set("SMTP", "smtp.mail.com"); do?
<9> :?
<8> He meant that PHP on *nix always uses a local sendmail/smtp command
<8> jaybuffet- no
<8> jaybuffet- when we say always, we mean always
<2> adgfad - what is your tmp path set to/
<1> jaybuffet: you can't do it from php on a linux host
<8> *nix completely ignores the SMTP server setting in php.ini
<6> ok
<6> so what are my options.. i need to send through another email server
<6> from php
<2> Pear::Net_SMTP
<9> ohhhh
<9> sorry masters
<9> echo('<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />');



<1> jaybuffet: change your local MTA config, or don't use mail(), use soemthing like pear::mail or phpmailer
<6> ok
<9> it was that on the html form
<9> now it works )))
<9> thx eljak for the tips
<9> sorry all for the flood it was wit no offense
<3> http://hashphp.org/pastebin?pid=6293 ->one thing more about that: the getInstance is called in a LOOP, it can't be a problem
<6> thanks for the help
<10> ok
<1> Aap: try var_dump(self::$instance) in the function, to make sure it's stating set
<1> and I'm sure NULL will always have the behavior you want, maybe is_cl*** or !empty() or soemthign would be better
<0> My: if (self::$instance) works fine :)
<3> hey but, if you want to use the instance in the same cl*** how then?? also Router::getinstance()??
<3> or self?
<8> Try is_null(self::$instance)
<0> Aap: You're creating an instance in the same cl***? Well, no **** then.
<8> And explicitly set the default value to null
<0> Yes, use self::$instance, not getInstance()
<0> Dragnslcr: Not necessary.
<1> Aap: $this->
<3> well no, but i'm using methods in the same cl***
<8> Eh, I haven't really been paying attention
<8> Just took a quick look at the code
<3> In the cl*** router i'm using its own methods
<11> Pollita: You in?
<0> Heh, guys... when you define a variable without a value, it's NULL, okay?
<1> Aap: in fact, in the constructor you should probably be using $this-> instad of Router::
<3> u think so?
<1> Aap: the way you have it now, it's calling them staticaly, just like self::, and so the instance won't be used
<3> so "$this->initInterfaces(); ???
<1> the function won't have access to the $instance, unless you use self::$instance->zebra =...' which is just weird
<1> yeah
<0> The instance won't be used, unless you're using self::$instance, in which case it doesn't matter how you're calling them.
<3> okay, for the people who want to folow: it's about singleton pattern http://hashphp.org/pastebin?pid=6293
<3> so $this->
<1> in __contruct, you are within the instance, not the static, so $this-> shoudl be used unless you really want to access the staic
<3> k , let me check
<1> not sure how that affects your contrust issue, but it will certainly cause other odd behaviours
<12> can anyone help me out
<1> menx: with?
<13> hi all, I have a question..
<12> im getting spammed cause some idiots are submitting junk in my feedback form
<12> my inbox is gettign soo full of junk
<1> menx: you've had 3 answers that I've seen
<2> menx, we already told you what to do
<12> no you havn
<2> we won't write the code for you
<13> I have C++ code here and I want to access it from PHP. Is there an easier way than writing extension?
<1> menx: search your scollback
<12> cookie wont work
<2> what does the code do shul ?
<14> shul: call it with the backtick operator?
<1> menx: $_SERVER['REMOTE_IP'] could
<1> or, like i said, a dup post or timed post limit
<2> [17:16] Jeewhizzif($_SERVER['REMOTE_ADDR']=='111.222.333.444') die();
<13> Basically its a C++ library which gives statistical information
<13> what is the backtick op?
<2> how is it outputted
<12> isnt their a command in php to block access to a php page by IP?
<14> shul: it is the system() command. if you only want to call a program, thats the easy way
<2> backticks emnulate the system() call
<2> :)
<12> cause its always the same 3 ip addresses submitting the crap
<14> since its a library though, thats not the answer
<13> k
<8> menx- you could check $_SERVER['REMOTE_ADDR'], but you'd probably be better off doing it at the web server level
<2> brb
<12> DisablednnIP Address: 203.149.12.243nn DisablednnIP Address: 192.138.77.36nn
<12> DisablednnIP Address: 213.140.56.3nn
<3> **** man this is a prob
<12> those 3 IP
<12> im getting like 20 mails a minute
<12> ffs


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#lgp
#linux
#gaim
run pearl prog ubuntu
#linux
mysql gui apt-get on ubuntu
#debian
phpprobid php5
#perl
turn off beagled suse



Home  |  disclaimer  |  contact  |  submit quotes