|
|
/*
********************************************************
Raju's PHP Program
********************************************************
This simple PHP program which demonstrates you how
to call another PHP program. U can also pass the Parameters
to other program.
Here i am not dealing with the complexities of calling one
php program from other, rather i am demonstrating how u
can make inter program calls.
Here There are 3 programs
1. First program is raju.php in which i am checking the
the codition based on the condition i am calling the
other 2 programs hello.php, bye.php
2. Second Program (hello.php) an Third Programs(bye.php)
there is nothing great in them, i am using echo function
to display the message.
I welcome ur suggestions and comments. Please
mail me at [email protected]
**************************************************************
*/
/* cut from here */
/* save this as raju.php */
<?php
//assigning value to variable $a
$a = 1;
/*
checking the condition u can check either way ie true or false
condition
*/
if($a == "2"){
/*
to Pass the variables to hello.php give the variables above the
calling php
for example i am passing variable $name
*/
$name = "Raju"
include("hello.php");
//or require("hello.php");
} else {
$name = "Raju"
include("bad.php");
}
?>
/* cut here */
/* cut here */
/* save this as hello.php */
<?php
echo "Hello $name";
?>
/* cut here */
/* cut here */
/* save this as bye.php */
<?php
echo("bye $name");
?>
/* cut here */ |
|
| How to strip non-alpha characters from a string Categories : Regexps, PHP | | | Pageinfo: Array containing page URI, page query string (parameters), request method (GET or POST) and the complete URI Categories : Variables, PHP Options and Info, Arrays, URLs, PHP | | | Parse html (title :: meta) Categories : PHP, HTML and PHP, Regexps | | | A simple configuration file editor to ease you life in setting up php applications. Reads variables from a given file automatically and displays current value. New value will be written to file after submit. Categories : PHP, Filesystem, Regexps, Java Script | | | Parsing Simple Template Files and Data Categories : PHP, PHP Classes, Templates, Regexps | | | Making sure a string containes only digits or no digits. Categories : Strings, PHP, Regexps | | | Calculate Body Mass Index Categories : PHP, Algorithms, Regexps | | | Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | Check for functional file links (broken Files)
Categories : PHP, Data Validation, FTP, Regexps, Arrays | | | Finding numbers within a string Categories : PHP, Regexps, Strings | | | Force file download Categories : PHP, Filesystem, HTTP, Program Execution | | | Grab links from a page Categories : PHP, Regexps, HTTP | | | Banknote Validation - A PHP class that provides several methods to quickly validate banknote serial numbers of the following currencies: AUD, CAD, CHF, CNY, EUR, GBP, JPY, USD.
Categories : PHP, PHP Classes, Data Validation, Regexps | | | Form is a utility class for generating html forms. It provides form initialization and regex based data validation (both server and client side) with a convenient interface. This version obsoletes version 1.0a Categories : HTML, PHP, PHP Classes, Regexps | | | Execute a command to a string Categories : PHP, Program Execution, Filesystem | |
| |
| |
|