When I used the "date("nj") " function to generate an invoice, about 1
out of 500 times, nothing comes up
<?php
$invoicedate = date("nj");
?>
<html><head></head><body>
Invoice date:
<?php
print $invoicedate;
?>
</body></html>
So, when I noticed some invoices were missing dates, I tried this:
<?php
$invoicedate = date("nj");
?>
<html><head></head><body>
Invoice date:
<?php
if (!invoicedate) {
$invoicedate = date("nj");
}
print $invoicedate;
?>
</body></html>
But, still, 1 out of 500 times, no date prints to browser.
My question is: On some web-servers, does the date() function not always
work? If not, then why not?
out of 500 times, nothing comes up
<?php
$invoicedate = date("nj");
?>
<html><head></head><body>
Invoice date:
<?php
print $invoicedate;
?>
</body></html>
So, when I noticed some invoices were missing dates, I tried this:
<?php
$invoicedate = date("nj");
?>
<html><head></head><body>
Invoice date:
<?php
if (!invoicedate) {
$invoicedate = date("nj");
}
print $invoicedate;
?>
</body></html>
But, still, 1 out of 500 times, no date prints to browser.
My question is: On some web-servers, does the date() function not always
work? If not, then why not?
Comment