A PHP Error was encountered

Severity: Warning

Message: fopen(/tmp/ci_sessionb26e3818ff4829c3ea08506aca3178d2): failed to open stream: Disk quota exceeded

Filename: drivers/Session_files_driver.php

Line Number: 156

Backtrace:

File: /home/s949hbuup34l/public_html/webphplearn.com/index.php
Line: 292
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Failed to read session data: user (path: /tmp)

Filename: Session/Session.php

Line Number: 140

Backtrace:

File: /home/s949hbuup34l/public_html/webphplearn.com/index.php
Line: 292
Function: require_once

How to add date time in existing date and time in php
Apply for Zend Framework Certification Training

Corephp






PHP Date() Function

HI viewers many times we have to include or print current date in php Application
so to print that date and its in different format we can use date() function
Usage description date(format,timestamp);

d - Represents the day of the month (01 to 31)

m - Represents a month (01 to 12)

Y - Represents a year (in four digits)

l (lowercase 'L') - Represents the day of the week


< ?php
    echo "Today is " . date("Y/m/d") . " ";
    echo "Today is " . date("Y.m.d") . " ";
    echo "Today is " . date("Y-m-d") . " ";
    echo "Today is " . date("l");
?>                                    

< First Last >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top