Re: Re: HTML_progress problem with linux
| From: | Arnaud Limbourg | Date: | Tue, 25 Nov 2003 20:53:09 +0000 |
| Subject: | Re: Re: HTML_progress problem with linux | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23875@lists.php.net to get a copy of this message | ||
I'll try to have a look and send you some code tomorrow.
THe thing is that the same code produces different results just by changing platform.
PHP 4.3.4 on both platforms under apache.
Arnaud.
> Hello Arnaud,
>
> I don't understand how you 've obtained such result ;
> Could you send me the source code and tell me what version of PHP
> you're running.
>
> As you can see, i've used a user tips found on
> for english version at :
> http://www.php.net/manual/en/function.floatval.php
>
> for french (Arnaud) at :
> http://fr3.php.net/manual/fr/function.floatval.php
>
> in the HTML_Progress_DM::getPercentComplete() method
>
> function getPercentComplete()
> {
> $percent = sprintf("%01.2f",
> ( ($this->getValue() - $this->getMinimum()) /
> $this->getMaximum() )
> );
>
> if (function_exists('floatval')) {
> return floatval($percent); // use for PHP 4.2+
> } else {
> return (float)$percent; // use for PHP 4.1.x
> }
> }
>
> Laurent
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>