Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Create Simple Html File Through PHP Script

    • 0
    • 2
    • 2
    • 2
    • 0
    • 0
    • 0
    • 0
    • 171
    Comment on it

    This tutorial show's how we can create a simple Html file through PHP script.

    if($filename == ''){
        $filename = 'demo.html';
    
        $writefile = ($filename , 'w');
    
        $content  = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
        $content .= "\n";
        $content .= '<html xmlns="http://www.w3.org/1999/xhtml">';
        $content .= "\n";
        $content .= '<head>';
        $content .= "\n";
        $content .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';   
        $content .= "\n";
        $content .= '<meta name="keywords" content="" />';
        $content .= "\n";
        $content .= '<title>Title</title>';
        $content .= "\n";
        $content .= '</head>';
        $content .= "\n";
        $content .= '<body>';
        $content .= "\n";
        $content .= "<h1 style='visibility:hidden'>Heading</h1>";
        $content .= "\n";
        $content .= "</body>";
        $content .="\n";
        $content .= "</html>";
    
        fwrite($filename, $content);
        fclose($filename);
    
    
      }else{
          echo"FiIe Name All ready Exit";
    }
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: