php-windows Digest 21 Jun 2008 22:00:32 -0000 Issue 3489
Topics (messages 28944 through 28946):
Re: Get PHP Errors To Display
28944 by: Eric Lee
28945 by: Wei, Alice J.
How to go more precise ?
28946 by: Eric Lee
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
----- Original Message -----
From: "Wei, Alice J." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 21, 2008 12:12 AM
Subject: [PHP-WIN] Get PHP Errors To Display
Hi,
I am wondering if any of you on the list would know if I wanted to see any
PHP errors shown up on the browser screen instead of seeing a blank screen,
like the one below:
PHP Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in
/root/Desktop/test.php on line 127
How can I get it to show up? (Note: I got the error message above by putting
it on the Solaris system)
I welcome any suggestions.
hi,
1.) by script
<?php
ini_set('display_errors', 1);
...
...
?>
2.) by php.ini
display_errors = On
Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thanks, that did the trick.
Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]
________________________________________
From: Eric Lee [EMAIL PROTECTED]
Sent: Friday, June 20, 2008 2:05 PM
To: Wei, Alice J.; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Get PHP Errors To Display
----- Original Message -----
From: "Wei, Alice J." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 21, 2008 12:12 AM
Subject: [PHP-WIN] Get PHP Errors To Display
Hi,
I am wondering if any of you on the list would know if I wanted to see any
PHP errors shown up on the browser screen instead of seeing a blank screen,
like the one below:
PHP Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in
/root/Desktop/test.php on line 127
How can I get it to show up? (Note: I got the error message above by putting
it on the Solaris system)
I welcome any suggestions.
hi,
1.) by script
<?php
ini_set('display_errors', 1);
...
...
?>
2.) by php.ini
display_errors = On
Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
hi,
I'am writing a small function that calc how long estimate from day to day.
But that isn't so precise.
Any example for this ?
function range($period /* $start_time, $end_time */)
{
/* version 2*/
static $time_num = array(
'h' => 60,
'd' => 24,
'w' => 7,
'm' => 4,
'y' => 12,
);
static $time_unit = array(
'h' => 'Hours',
'd' => 'Days',
'w' => 'Weeks',
'm' => 'Month',
'y' => 'Years',
);
/* convert to base unit to minute */
$period = $period / 60;
/* version 2*/
$type = '';
foreach ($time_num as $key => $value)
{
if ($period > $value)
{
$period = $period / $value;
$type = $key;
}
else
break;
}
return $period . ' ' . format_string($type);
}
function format_string($unit)
{
/* version 2*/
static $time_unit = array(
'h' => 'Hours',
'd' => 'Days',
'w' => 'Weeks',
'm' => 'Month',
'y' => 'Years',
);
return isset($time_unit[$unit]) ? $time_unit[$unit] : $type;
}
Thanks
Regards,
Eric,
----------------------------------------------------
http://myprojects.srhost.info
eric{at}myprojects{dot}srhost{dot}info
--- End Message ---