|
|
|
The ability to change descriptions and titles of your site from one file is a very efficient method. This allows you to modify items and not have to go into each page that reflects that description or title.
-----------------------------------------------------------
Below are examples of titles and descriptions:
$text[1] = "My Site Title";
$text[2] = "Username";
$text[3] = "Password";
$text[4] = "<a href=mailto:your@domain.com>Contact Us</a>";
$text[5] = "Submit You Query";
-----------------------------------------------------------
Below are where you can use these items. Place an include() statement in a page that is global such as your index.php page.
| <?php include("Language.php");?>
Use the $text[4] in your menu as follows:
<?php
echo "<tr>\n"
. "<td>$text[4]</td>\n"
. "</tr>\n";
?>
Use the $text[5] in your form submit button as follows:
<?php
echo "<input type=\"submit\" name=\"submit\" value=\"$text[5]\">\n";
?>
-----------------------------------------------------------
When calling a language item in a user-defined function.
<?php
function user_form() {
global $text;
}
?> | | |
|
| PHP based Contact email form with multiple recipients, text file based, supports departments. Categories : PHP, Email, Beginner Guides, Filesystem | | | Convert a File database into MySQL Categories : PHP, Filesystem, Databases, MySQL, Beginner Guides | | | Select random Image from any directory Categories : PHP, Beginner Guides, Filesystem | | | Simple image counter Categories : PHP, Graphics, Filesystem, Beginner Guides | | | Introduction to Language Files Categories : PHP, Filesystem, Beginner Guides | | | A flat file counter Categories : PHP, Cookies, Filesystem, Beginner Guides | | | email new items in db Categories : PHP, Email, Databases, MySQL, Beginner Guides | | | A very simple PHP single password cookie based login without usernames. Categories : PHP, Cookies, Security, Beginner Guides | | | Random Image Display Categories : PHP, Filesystem, Graphics, HTML and PHP | | | The toll booth Categories : PHP, Java Script, Filesystem | | | php jump urls...the best way Categories : PHP, URLs, Filesystem | | | 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 | | | Display list of files within current and subdirectories (recursively) showing
each file as an anchored link and each directory as a category header. Categories : Filesystem, Directories, Arrays, PHP | | | Different Call User Functions Categories : PHP, Functions, Beginner Guides | | | File Explorer, browse, upload, download and edit your web site files with only a browser and a HTTP connection. Categories : Complete Programs, Content Management, Filesystem, PHP | |
| | | | Kelvin Lee wrote : 1178
I can`t find the Language.php file attached in the sample. Where can I find it?
| | | | Ron FREDERICK wrote :1181
There is no file, just create a file yourself and call it Language.php or any file name you choose and place the examples in it.
<?php
$text[1] = "whatever 1";
$text[2] = "whatever 2";
?>
| |
|
|
|