logs archiveIRC Archive / Freenode / #php / 2015 / November / 22 / 1
wfpkhc
ok so dont use filter input, use filter_Var
thank you
__adrian
sure
wfpkhc
as a question
why doesnt it just return true or false
why does it come back with a mixed
__adrian
it's not a validator; it's a filter
wfpkhc
....
Bad_Advice_Cat
LOL @ #pjp
wfpkhc
should i add - FILTER_FLAG_PATH_REQUIRED to it then
no nevermind that
thank you again
Bad_Advice_Cat
[Notice] -ChanServ- [#pjp] Did you mean: ##PHP ? <- Wow.
php
kewl
Not that it helps at all
lol
         

Kirito
(Action) registers ##pjp and makes it say "Did you mean #python?"
Bad_Advice_Cat
lol.
glowdemon1
Hi, http://www.hastebin.com/jinakolime.coffee -- My visitor counter stopped working a week ago. It doesn't give me any errors. Is there something wrong and how can I dig deeper in this?
All errorlogs are empty
pcfreak30
If I have a class of ProcessManager and Process would it be a better design to have actions on processes be put as methods on ProcessManager or Process
glowdemon1
Disregard my question
cezdev
Hi guys
milky
http://blog.cinu.pl/2015/11/php-static-code-analysis-vs-top-1000-wordpress-plugins.html
tw2113
*segfaults*
droid909
what is recomended to execute a shell command?
exec or shell_exec?
AcidReign
droid909: yes
droid909
AcidReign: both :D ?
Bad_Advice_Cat
drodger, depends on the return value that you are expected.
AcidReign
droid909: either
droid909
k, thanks
Bad_Advice_Cat
exec and shell exec are not the same.
droid909
Bad_Advice_Cat: i don't expect any return
AcidReign
yes it depends on your needs, they work slightly differently
Bad_Advice_Cat
droid909, then how will you know if the command ran okay or not?
droid909
Bad_Advice_Cat: i don't care
Bad_Advice_Cat
You should read the notes that appears on "shell_exec" page and such.
         

droid909
Bad_Advice_Cat: it is like udp protocol
...
Bad_Advice_Cat
You're the one who asked for recommendation without stating your requirements.
droid909
Bad_Advice_Cat: ok
Bad_Advice_Cat: thanks
YamakasY
is there a way to ignore something you parse ? so no if but the same id when you want to hide a html #id
Bad_Advice_Cat
YamakasY, I do not understand your question well. It's sounding like a bad idea.
(A bad idea that could probably be easily avoided by following good practices)
oojacoboo
YamakasY: you might look at http://php.net/manual/en/function.array-unique.php
not sure your actual issue though
Bad_Advice_Cat
YamakasY, you shouldn't have duplicate ID anywhere in your HTML.
YamakasY
nah I have a html template where I replace stuff in, the template is in a column... but as this column is used for more things I would like to not parse something in some cases
I can do a hide tho
Bad_Advice_Cat: duplicate ID ?
where did I say that ?
oojacoboo
YamakasY: pretty sure you're lacking an understanding for what you're even doing
Bad_Advice_Cat
YamakasY, the HTML you are parsing has same ID, right? <div id="foo"?> ?
oojacoboo
you're not even explaining the issue in an intelligible manner
Bad_Advice_Cat
And then you have the same <something id="foo"> ID somewhere in your code?
YamakasY
relax guys
it's simple.. I use this template for a mail, but it also parse it in a browser if needed
Bad_Advice_Cat
You should know that I never relax. ;)
YamakasY
so when it's in a browser and I set placeholders I would like to remove some part if that's possible in some way
tw2113
he's bad at relaxing
YamakasY
Bad_Advice_Cat: I give you a Good Advise... Relax
I think his GF likes that
nice when there needs to be done some cleaning, etc :)
wtf, again 1Kg of candy in one day
tw2113
lets get back on the topic of whatever you're trying to figure out
YamakasY
could I do some string replace from <p id="fofo>balbalblabla</p> to "" ?
tw2113
like with str_replace?
YamakasY
maybe ?
oojacoboo
YamakasY: fix the issue at the root - quit hacking it
biberu
^
oojacoboo
you're giving php devs a bad name
php
I will restore all faith in PHP devs.
(Action) runs the restoreFaith() method.
Done.
mmmmmmmark
Thank, php.
YamakasY
wtf ?
Bad_Advice_Cat
php, I'm actually getting ready to explore other languages. :p
nodejs, python... for web dev :p
YamakasY
I did nodeJS
it's cool
Bad_Advice_Cat
There is a nice talk on it too: https://www.youtube.com/watch?v=Ya4NotZNc4Y
YamakasY
but has a completely different way of security
php
I'd get into node if I could.
I start working with it, then I stop because the frameworks are sh*t.
YamakasY
I never did it before and build a complete videochat system in it :)
oojacoboo
completely different way of security... ><
Bad_Advice_Cat
php, it's hella easy. - Are you already using vagrant?
php
Yes. I know how to USE node.
YamakasY
oojacoboo: yap, very different, no serverside anymore actually
oojacoboo
lol wut?
php
I'm able to write perfectly fine Node websites with Express.
But actually making them advanced is almost impossible for me.
I can't do login, logout, or make blog posts.
YamakasY
oojacoboo: yes, the interaction is not like as PHP does that
Bad_Advice_Cat
php, you just need a way to render templates. Store sessions. It's nothing special.
oojacoboo
YamakasY: how's that?
YamakasY
but anyways, can I replace a whole paragraph in some way ?
oojacoboo
you don't think node runs server side?
« prev 1 2 3 4 5 next »