@# 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:

<0> dools: TML thanx... maybe i'll be back with some questions
<1> it's in binary TML i need convert to Hexadecimal
<1> Than how i ready the Hexa?
<2> i often wonder what an ENCAPSED string means
<3> to call a function outside of a cl***, would it be: $cl***name->functionname();
<4> No
<4> $obj->method()
<4> Cl***Name::staticMethod()
<5> GNN-Ricardo, result you fetched from SQL is already binary
<5> GNN-Ricardo, try: echo (string)(mysql_result(mysql_query("SELECT 0x41464b"),0));
<6> a function to captilize the first character in a variable would be... ?
<4> Xspl0it: php.net/ucfirst
<7> GNN-Ricardo: Why do you need to convert it to hex?
<7> GNN-Ricardo: What you need to do is figure out the binary format being stored in the database and output the bytes directly along with an appropriate MIME type.
<7> GNN-Ricardo: Which is why I said "That's not a valid image in any format I've ever heard of."



<7> Because knowing the format is absolutely CRUCIAL to what you want to do
<8> hi guys im wondering whats wrong with this. http://rafb.net/paste/results/6Bb4sF54.html
<4> Kind of like cooking a meal without the ingredients.
<7> By the way, for those who may still have doubts, this is a *CL***IC* example of why you should NEVER EVER EVER store images in a database
<2> or trying to spread a virus through images :-S
<7> Petre: What makes you think something's wrong with it?
<8> because it doesnt work
<4> Petre: You might be better off telling us what is wrong.
<4> php-bot: tell Petre about doesn't work
<7> Petre: Then either you're not telling us something, or $row->cv_type != $row->cv_job
<8> give me a sec. to explain
<8> Well i created a table containing with columns, id and cv_type. cv_type has values Perm, Contract, Both. Now cv_job is either var which is either Perm, Contract or both. This var is taken from another table. Basically i want to compare them and see if they match. If they do that option should be selected
<6> thank you kuja
<8> better guys?
<9> i have run a load test on apache2 (on FreeBSD 6.0) and after a heavy load php seemed to stop working. Where should i start from???
<4> Petre: And you're saying something that should be selected doesn't get selected?
<8> yes
<4> Petre: $row->cv_type == $row->cv_job
<4> Then this is likely to be your problem, as TML pointed out.
<7> Petre: Check the values of $row->cv_type and $row->cv_job. One, the other, or both are not the value you think they are
<8> i tried doing echo and the both are the same
<4> var_dump() them.
<4> "foo " != "foo", for example.
<10> hi
<10> i want to know if a file is aviable on a server
<8> ok ill try that
<4> Sp4rKy: file_exists()
<4> Well, php.net/file-exists
<4> Read about it, and see if it is what you want.
<11> sorry , wifi issue
<11> anyone could help me please
<12> Sp4rky: What's your problem?
<4> Sp4rKy_: php.net/file-exists
<11> berry__, didn't you see my five previous line ?
<11> i want to know if a file is aviable on a server
<11> actually, i use fopen()
<12> Sp4rky: Didn't you read the five previous line of kuja?
<11> kuja, does it work on a distant webserver ?
<4> Sp4rKy_: Read the page
<13> Sp4rKy_: did you try it?
<4> Also, there is no failproof way of seeing if a file exists on a given webserver.
<14> sorry
<14> i'd disconnected with the wofo
<14> *wifi
<14> what did you say ?
<4> Heh
<2> geez, i just made a function 17 times faster by refactoring it... performance tuning is the bomb!
<15> berry__, well, you were kind enough to visit my new channel :)
<14> does is_readable() work fatser than fopen ?
<4> I don't think you know what you're doing, max__.
<4> I had said earlier, there is no reliable way to see if a given file exists in a webserver.
<4> s/in a/on a/
<14> kuja why ?
<16> how do I make this $test = htmlspecialchars(preg_replace('/\.*$/', '', $file)); only display .htm en .php fils?
<16> e
<7> max__: Because fopen() will always return true on HTTP, and file_exists() uses stat(), which isn't available over HTTP
<4> GieltjE: Come again? This time more clearly
<16> that line lists the directory
<16> how can I make it so that it only displays files with .php or .html



<4> How does that line list a directory? Unless $file is a string of a directory listing, which is completely insane.
<17> max__: the most reliable way to see if a file exists is to request the file from the web serer and make sure you get a "200" status in the http header
<4> foreach (preg_grep('/\.(html?|php)$/', glob('/some/directory/*')) as $entry) { echo "$entry\n"; }
<4> Or rather, you could tell glob() to do that, I remember
<4> glob('/some/directory/*.{html,php}')
<18> hindog, does this work? http://pastebin.com/655553
<16> kuja: $file is a loop which lists every file
<4> "$file is a loop"?
<18> "hindog" was supposed to be a "hi", hitted tab accidentally =)
<16> while
<4> $file is a loop, how?
<16> $dh = opendir(".");
<16> while (false !== ($file = readdir($dh)))
<17> TuxAtWork: do you think it doesn't "work"?
<4> Heh, so you're doing things the hard way. And for clarification, $file is not a "loop"
<17> and what do you mean by "work"?
<4> It's called a "variable".
<18> ||cw, I mean, does the "die" gets executed?
<13> foreach (glob("*.txt") as $filename) { echo "$filename; }
<13> meh
<17> TuxAtWork: well, if both conditions are false, yes
<4> GieltjE: $entries = array_map('htmlspecialchars', glob('/some/directory/*.{html,php}')); // Maybe this is what you want?
<16> thnx
<18> why false ||cw?
<17> TuxAtWork: sorry, true
<18> oh, 0k
<18> thanks ||cw
<17> TuxAtWork: but the if's will cascade like that, if that's what you are asking
<18> yes, that's what I was asking
<17> TuxAtWork: of course, you could just try it
<18> yes ||cw, I will, thanks =)
<17> and that's generaly not considered a coding practice that yeilds easy to understand code
<16> kuja: how do I apply this thing?
<4> That is for you to decide.
<19> is there a way to say "does string1 start with string2" without a regex?
<16> I mean simply placing it in a wile and echo'ing it does not work
<20> enygma: strpos()
<21> how would u evaluate if all variables in the get query string are null ie. ?a=&b=&c=
<5> +strlen and substr
<13> empty()
<22> flaccid: $all_empty = truel; foreach ($_GET as $v) { if (!empty($v)) { $all_empty = false; } }
<21> the problem i have is that it evaluates to true if its ?a=&b=&c= or ?
<21> i need to differentiate between the two ie. if the form was submitted with blank values or there is nothing in the query string
<23> i want to know, what is the best engine that support template, modular system, etc? is that postnuke or something elese? i want to learn from it about how to create good engine for my project
<22> flaccid: if (isset($_GET['a']) && empty($_GET['a])) { /* empty but set */ }
<21> thanks i'll try that
<24> hi everyone, im writing a little regexp to parse something like this:
<24> hello{
<24> world}
<24> i wrote it like:
<24> '/((?:hello])(?:\{{1,1})(?:\n)(.*)(?:\}{1,1}))/'
<24> and it works, but if change \n before { like this:
<24> '/((?:hello])(?:\n)(?:\{{1,1})(.*)(?:\}{1,1}))/'
<24> it must read:
<24> hello
<24> {world}
<5> Hirsulhim, Silence!
<13> wtf
<24> but isnt working, i was usgin (?m) and (^) with no success, any idea?
<22> Hirsulhim: that's a *terrible* regex, just quietly
<13> Hirsulhim: http://phpro.org/tutorials/Introduction-to-PHP-Regular-Expressions.html
<24> ok, reading
<1> TML after a research i found, this Image it's GIF
<1> how could i MIME this binary to GIF? and PRINT?
<17> GNN-Ricardo: do you understand what MIME is for?
<17> and that it has nothing to do with printing?
<25> hi, i need to make sure that every single item in an ***ociative array is not empty
<17> JaredCE: use array_map()
<9> is there are tool for profiling php without altering the code??
<17> dragan: I've heard that the zend IDE has a profiler
<26> I use this in apache's VirtualHost config : php_admin_value auto_append_file "/home/www/stats.php" -- to include a footer in every PHP page, but there are a couple of directories where I don't want that to apply it, what can I put in a htaccess to deactivate it?
<17> i cna't say for sure though
<17> retro_neo: i guess setting it to "" doesn't do it?
<27> Anyone on with PHP5.1.2?


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#kernel
triplah
+ubuntu +lexmark +z605
#perl
giftoxic ares
brlpdwrapperDCP7020
#ubuntu
kernel panic -not syncing : CPU context corrupt
#centos
human, let me rephrase the question



Home  |  disclaimer  |  contact  |  submit quotes