Home > Backend Development > PHP Tutorial > PHP article publication time and article validity period

PHP article publication time and article validity period

WBOY
Release: 2016-07-25 09:13:19
Original
989 people have browsed it

From "265 Examples of PHP Classic Programming"


  1.                                                           Title: < input type = 'text' name = 'text' select name="check">
  2.                                                                                                                                                                                                                                      < ;/option>

  3.                                                                                                                                                                                                                                                                                                                                                   'sub' value='OK'> function str ($str){                                                                                                                                                                                                                                                    //Custom function.
  4.                                                                                                                                                                                                                $str = preg_replace("/ /"," ",$str);
  5.                                                                                                                                                                                                          $str = preg_replace("/cha(13)/","
    ",$str); : Echo "content:". $ Str; // Output.
  6.                                                                                                 //Pass parameters via post.
  7.                                                                                                                                                                     to
  8.                                                                                                                                                      echo "<script>alert('Content cannot be empty');location.href='index.php'</script>"; //Output prompt.
  9.                                                                                                                                                                                  
  10.                                                                                                                                                                                                                                                       if(!empty($_POST["check"]) ||
  11.                                                                                                                                                                                                                                                                 ".$_POST["text"]."
    "; //Output content and drop-down list content.
  12.                                                                                                                                                                                                                                                                       ".$_POST["text"]."
    "; / /Otherwise only the text field content is output.
  13.                                                                                                              
                                                                                                     echo "
  14. echo date ("Y-m-d H:i:s")."
    ";
  15.           $time=time();
  16.               $time_r=strtotime("1 August 2014");
  17.                            ".ceil((($time_r-$time)/(3600*24)))."天";
  18.       }
  19.      }
  20. ?>



  21. Copy code





source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template