seek scripts php
SEEKSCRIPTS.COM - OPEN SOURCE, FREE AND COMMERCIAL PHP SCRIPTS FOR YOUR SITE

home page latest news web development curriculum vitae php scripts contact me

  • C# (Microsoft .NET)
  • JAVA
  • Dynamic HTML
  • PHP & MySQL
  • ASP.NET - C# & VB.NET
  • Perl & CGI
  • C | C++
  • Vector Markup Language
  • SMIL
  • Assembler
  • Databases
  • Wap Development
  • Web site promotion
  • Web Marketing


  • Curriculum Vitae (CV)
  • Major web solutions
  • Web design projects
  • Software solutions

How to ensure that a PHP file can not be executed directly but just included?

Free programming example written by Anton Zamov


This technique could be useful if you have some files to be included, 
and you wish to prevent that they are executed directly by 
placing their address in the web browser etc.
You need to add the following lines at the begining of your PHP script:
 
<?php 
if ($_SERVER['REQUEST_URI'] == $_SERVER['PHP_SELF']) 
    die("A message ..."); 
 
...
 
?>  








Jobs Portal, poweful jobs board software

PHP Mall, multi vendors mall website software

Car Portal, php script for auto classifieds websites

NetArt Media, software products and services

Real Estate Portal, web software for real estate portals

Blog System, multi user blog hosting script

Classified Ads Script, Responsive & SEO optimized PHP classified ads script for your site

WebSite Directory Script, Create easily your own website directory with this professionally designed script

C# (Microsoft .NET) | JAVA | Dynamic HTML | PHP & MySQL | Perl & CGI | C | C++ | Vector Markup Language
SMIL | Assembler | Databases | Wap Development | Web site promotion | Web Marketing

Copyright Anton Zamov 1998 - 2023