| |
| |
| |
|
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
Comments:
<0> +od <1> StormS: Don't. Focus on what is shown at php.net/header <0> aiai captain <1> College: Did you try reading the user comments? <2> i have a question about the implode function <3> TML: yeah althou I may have missed something <1> Heros: Ask it <3> *reading again* <2> is it the same as executing a loop and echoing it? <1> Heros: Well, except that it does the loop in C rather than userland, and it doesn't echo, sure <2> what do you mean by userland? <1> Heros: <?php .... ?> <2> k <2> thx <4> College: It sounds like to me that you're going to first off have it $rounded = round($number,3); Then ... some sort of list($abs,$decimal) = explode ('.',$rounded,2); if ($decimal{3} && $decimal >= 1 && $decimal <= 2) {} // it's complicated <1> the-erm: *blink*
<3> the-erm: cheers <4> there's got to be a better way. <4> I just don't know enough math. <3> the-erm i was thinking multiplying by 100 <4> that might work as well. <3> so it was easier to work with <3> and then doing the rounding <4> there's got to be a better way to round ... <5> WTF? <5> College: What are you trying to do? <2> umm i have another question...what's message_die?...i dont think it's a message kill though <3> just trying to round to nearest 5 cents <5> College: Are you kidding me? <1> Heros: message_die isn't a PHP function <5> College: Ever heard of rounding ? <3> yes <5> College: Perhaps you should have a look at the manual there... <4> the point is ... round() doesn't round to the nearest 5 cents. <3> owh: I have for the last hour <4> it's a decimal based round. <5> the-erm: And your point is? <3> owh: do you have a solution that would work? <4> 1-10 != 1-5 <5> the-erm: Hint: A decimal based round does the same as a round for one decimal point different. Round using a figure with a different decimal point... <5> the-erm: You're making the answer waaaaay toooo complicated. <1> No kidding <4> that's why I said round($number,3); <3> $19.97 rounds to $19.95, $19.98 goes up to $20.00 <3> thats what i'm looking for <5> College: So, move the decimal point and round it. <5> College: You know, multiply and divide by 10... <3> yeah i tried moving it 2 places <3> so it was 1997 <3> but then getting it to 1995 <3> or 2000 was the next part <5> College: What about 199.7 ? <3> if i round that i lose the decimel, goes to 199 or 200 <3> need that .05 <6> Afternoon <5> College: Also, IIRC the round() function handles this nativly :-) <5> College: Then move the decimal back :-) <3> hmm k, will give it a go <7> is there a way to display chars like or right in a xml feed? <4> so you're saying ... $number = round($number * 10,1); $number = $number * .1; would do it? <4> I was thinking of mod. <3> $x = 19.96 * 10.0; <3> $y = round($x,2); <3> echo $y / 10.0; // returns 19.96 <5> TML can you use a modulus of a float? <1> That's the route I'd end up going. $ = ($*1) % 1; <1> err, taht's $cents = ($price*100) % 100; <7> hmm :) <1> Then you just check abs($cents-5) <8> hi ppl <8> can someone help me undestanding the php file format that contain several charcodes intead the php code <8> all the files start with Zend <1> Extreminador: What? <8> i have made a download off a script
<1> Extreminador: Are you looking at files that have been encoded using the Zend Encoder? <8> php script <8> dont know, firts time that i have seen this <8> is ther any Zend Ecnonder ? <8> inside the php files all off them start with the word Zend <1> Extreminador: http://www.zend.com/store/products/zend-encoder.php <8> thanks TML <8> firts time that i have see this lol <1> Extreminador: If those files have been encoded using the Zend Encoder, someone doesn't want you to have the source, and we're not going to help you get to it. <8> yup now i get it <8> i have made the download from emule <1> Extreminador: Which makes you suspect from step one. <1> I've never heard of a legitimate use of emule. <8> true TML <6> Extreminador, what does the script do? Maybe we can suggest an alternative? <0> perhaps a stupied question.. but can you run a php line in a strict .htm doc? (I'm only used to include htm in .php doc)? <6> StormS, just make sure it's the first part of the output ... If I understand your question correctly. <8> pod yes i have some other alternatives <1> StormS: Are you asking if you can make the server parse html files as though they contained PHP code, in addition to files registered as x-httpd-php? <8> but i was only curiose in particular about this becouse the Zend <9> on http://pastebin.com/531829 why am i not getting the "echo $_REQUEST['file'];" on line 13 <8> i didnt know thatbwas possible <8> to encode the php <6> Extreminador, has been possible for a few years. <1> krzkrzkrz: if ( !$_REQUEST['file'] ) { echo $_REQUEST['file']; <8> firts time that i have heard off <10> hi. i have a similarly somehow stupid question, how to prevent apache from parsing php in a certain dir? <0> if you have index.htm (can it contain php) ? <1> krzkrzkrz: You're only trying to echo it when it has a false value. <9> ah, silly me indeed <6> StormS, Yes, but you have to tell the webserver to parse it with php... Which is going to add extra load to pages that don't have php in them. <1> StormS: If you're on apache, and using the PHP module, only if you make all files with that extension be processed by PHP by modifing your AddType / AddHandler line. <5> College: How are you going with that? <3> worked it out <0> k... so it means in general that the answer is no <3> echo round($x*20,0)/20; <5> College: I was going to ask you if it looked like this: round(10.98*20,0)/20 <5> College: It did :-) <3> lol <3> yup <3> thanks for you help b4 <5> College: Do you know why the 20 is there? <6> StormS, It is not suggested, but it is possible. <3> yeah <3> 20th of a dollar <11> could anyone help me on sugarcrm <9> is it possible to have a public static function? <5> College: Excellent :-) <11> could anyone help me on sugarcrm <0> I was just confused pod, as php.net/header <5> TML, can you please do the honours? <0> <html> <0> <?php <0> /* This will give an error. Note the output <0> * above, which is before the header() call */ <0> header('Location: http://www.example.com/'); <0> ?> <9> or not advisable <10> anyone can help me? i wonder how to prevent apache from parsing php in a certain dir? <5> TML, make that twice :-) <0> and state that it just have to be before any output <11> could anyone help me on sugarcrm <5> mmmmeow: Look at .htaccess <10> i noe .htaccess <12> owh: surely they get a link to the guidelines first <10> but what to write in? owh <5> GarethAdams: Not with obnoxious behaviour like that.... <1> Sorry, was on a different window. <5> TML - tah <5> mmmmeow: In your favorite text editor. <10> haha~~ <5> mmmmeow: And have a google before you start asking here, and #apache is a good place to visit too :-)
Return to
#php or Go to some related
logs:
device-mapper: deps ioctl failed: Invalid argument #math lactophilia+pics kulhas #osdev #perl --recv-keys 1F41B907 enterminus missing keyword #lgp #centos
|
|