Create Dynamic Web Pages using PHP-MYSQL

Create Dynamic Web Pages using PHP-MYSQL

Welcome to the In Pakainfo.com website! You will Step By Step learn web programming, easy and very fun. This website allmost provides you with a complete web programming tutorial presented in an easy-to-follow manner. Each web programming tutorial has all the practical examples with web programming script and screenshots available.

index.php

<?php
$myFileName = "filename.html"; // or .php file  or .css file genrated
$fh = fopen($myFileName, 'w'); // or die("error");  
$stringData = "
<?php include('config.php');?>
<?php include('header.php');?>
<?php include('sidebarmenu.php');?>
<p>
<ul>
<li>how to create dynamic web pages using php & mysql</li>
<li>php generate html page</li>
<li>how to create dynamic pages in php</li>
<li>how to generate a html page dynamically using php</li>
<li>php dynamic page content</li>
<li>php dynamic website source code</li>
<li>using php to generate html</li>
<li>how to create a dynamic website in php step by step pdf</li>
</ul>
</p>
<?php include('footer.php');?>
";   
fwrite($fh, $stringData);
?>

Output : filename.html

Automatically This index.php file run to create a filename.html or filename.php genrated dynamically.

Also Read :  WordPress AJAX - Wordpress jQuery AJAX POST Request

<?php include('config.php');?>
<?php include('header.php');?>
<?php include('sidebarmenu.php');?>
<p>
<ul>
<li>how to create dynamic web pages using php & mysql</li>
<li>php generate html page</li>
<li>how to create dynamic pages in php</li>
<li>how to generate a html page dynamically using php</li>
<li>php dynamic page content</li>
<li>php dynamic website source code</li>
<li>using php to generate html</li>
<li>how to create a dynamic website in php step by step pdf</li>
</ul>
</p>
<?php include('footer.php');?>

dynamically generate simple links

PHP script to dynamically generate simple links to the files present in current directory

<?php
$dir_open = opendir('.');

while(false !== ($fname = readdir($dir_open))){
    if($fname != "." && $fname != ".."){
        $link = "<a href='./$fname'> $fname </a><br />";
        echo $link;
    }
}

closedir($dir_open);
?>

<? //Generate simple text file on the fly using php

   header("Content-type: text/plain");
   header("Content-Disposition: attachment; filename=myfile.txt");

   // do your Db dynamic content into $result
   print "how to create dynamic web pages using php & mysql\n";
   print $result;
 ?>
 

Pakainfo.com

Also Read :  Create RESTful API using PHP

Leave a Reply

Your email address will not be published. Required fields are marked *