Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


Php Programming Code Examples

Php > Content Management Code Examples

Source Veiwer

Source Veiwer <?php //main part of the file echo "<form action=$PHP_SELF method=post>Filename Or Url: <input type=text name=filename value=$filename size=50><br><br>"; if($filename) { //validation $filename != "/ect/passwd/" OR DIE("Your not allowed to veiw this code!"); //end validation @$contents = file_get_contents("$filename") OR DIE("No such file!"); //displays file or urls source code if all goes well echo "<center><textarea rows=20 cols=90 name=text>$contents</text><br><br></form>"; } ?>