Home PHP Libraries Other libraries PHP class library generated from static files
PHP class library generated from static files
<?php
class CreateHtml
{
  function mkdir( $prefix= 'article' )
  {
    $y = date('Y');
    $m = date('m');
    $d = date('d');
    $p=DIRECTORY_SEPARATOR;
    $filePath='article'.$p.$y.$p.$m.$p.$d;
    $a=explode($p,$filePath);
    foreach ( $a as $dir)
    {
      $path.=$dir.$p;
      if(!is_dir($path))
      {
//echo '没有这个目录'.$path;
        mkdir($path,0755);
      }
    }
    return $filePath.$p;
  }

Static document refers to a document with fixed content. It is created by the World Wide Web server and stored in it. When a client uses a browser to access the document in the World Wide Web server, a copy of the document is sent to the client, and the client can use the browser to display the document. Of course, the document content in the server can be modified, but the client cannot modify it. The biggest advantage of static documents is that they are simple and can be created by non-programmers. Its disadvantage is that it is not flexible enough. Therefore, documents whose content changes frequently are not suitable for static documents.

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

Fast class library to generate static HTML with PHP Fast class library to generate static HTML with PHP

21 Dec 2016

Use PHP to generate static HTML code, friends in need can refer to it.

Describe in detail the templates and caching of static files generated by PHP Describe in detail the templates and caching of static files generated by PHP

25 Jul 2016

Describe in detail the templates and caching of static files generated by PHP

http://www.google.com.hk/ A fast class library for generating static HTML using PHP http://www.google.com.hk/ A fast class library for generating static HTML using PHP

29 Jul 2016

http://www.google.com.hk/:http://www.google.com.hk/ A fast class library for generating static HTML using PHP: Copy the code as follows: <?php ///// ///////////////////////////////////////////////////// ////////////////////////// // // Zhang Shulin - Huijia Studio // // Module Name: woods-bhtml.php // Abstract:

How to call php files from static html, _PHP tutorial How to call php files from static html, _PHP tutorial

12 Jul 2016

The method of static html calling php files. The method of static html calling php files. It seems that the php files cannot be called directly in the static page, but you can use the js calling method to call the php files. Of course, you can also use

How to call php files from html static pages, _PHP tutorial How to call php files from html static pages, _PHP tutorial

13 Jul 2016

How to call php files from html static pages. How to call php files from html static pages. This article describes the method of calling php files from html static pages. Share it with everyone for your reference. The specific method is as follows: Look at the static page

How to Execute Java Class Files from a PHP Website? How to Execute Java Class Files from a PHP Website?

22 Oct 2024

This article discusses the execution of Java class files from PHP websites to utilize Java functionalities within web pages. The main issue is executing Java programs and retrieving their output in PHP. It provides solutions using the PHP exec() func

See all articles