Home | Add to Favorites | Ebooks Directory | News  
PHP  Script programming
Home
PHP  Article
PHP Tutorial 
PHP Script  Download
Books
PHP Manual
PHP Resource
PHP Tutorial

8. To Do Color-Coding for scripts
   
   One might wonder how does the code samples are highlighted correctly.This is done in an  
easier way by highlight_string()    function or highlight_file() function.The highlight_file () function highlights and applies color coding to files with .php or .inc extensions

 

<?php
   $filename=basename("http://alphacms.sify.com/cms/training/php_tutorials4.php");
   $file_arr=preg_split("/\./",$filename);
   if($file_arr[1]=="php" || $file_arr[1]=="inc")
   {
   highlight_file($filename);
   }
   else
   {
           echo "<font color=red size=4>Only PHP files or INC files can be highlighted</font>";
   }
   ?>
  


 
9.  To get the detailed information about PHP installed
   
   To get all the possible information like version, modules installed, web server installed etc,... about the PHP    script software installed,the phpinfo() method can be used as follows.


   <?php
   // Show all information, defaults to INFO_ALL
   phpinfo();
   ?>

 

                                                         Go To Index