|
|
|
/*
********************************************************
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 raju_php@yahoo.com.
**************************************************************
*/
/* 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 */ |
|
| Check if a file exists on a remote FTP server with PHP Categories : PHP, FTP, Regexps | | | Show Source with Line Numbers Categories : PHP, Regexps, Filesystem | | | Avoiding or Detecting high bit characters in a string. Useful when you want to create a valid RSS feed Categories : PHP, Strings, Unicode, Regexps, Rich Site Summary (RSS) | | | PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP, PHP Options and Info, Debugging, HTML and PHP | | | ereg -- Regular expression match Categories : PHP, PHP Functions, Regexps | | | BBCode Formatting String Categories : PHP, HTML, Regexps, Arrays | | | Tag content retrieval from websites with preg_match Categories : PHP, Regexps, Arrays, HTML and PHP | | | I need a trim function/regexp that will trim all " " from the ends of a string. Categories : Regexps, PHP, Strings | | | This script is a contact form between users of a
website (kinda like the PM function on the forums)
Categories : PHP, Databases, MySQL, Regexps | | | Simple way to replace a variable value in a .conf (.ini) file using a
webbrowser - the first stage of a complete universal configuration editor Categories : PHP, Regexps, Code Editors, Filesystem | | | dl -- load a PHP extension at runtime Categories : PHP, PHP Functions, PHP Options and Info | | | email validator check checker email e-mail email address Categories : PHP, Email, Regexps | | | Gets the browser and OS from the $_SERVER['http_user_agent'] variable in PHP Categories : PHP, HTTP, Regexps | | | a PHP Function to Get only the filename (remove the extension) using regular expressions. Categories : PHP, Regexps, Beginner Guides | | | PHP Script to find url links in a page Categories : PHP, URLs, Regexps, Arrays | |
|
|
|