I have looked all over the site and could not find anything that was like this simple, or just like this at all..
For some people i know that you are using a basic HTML site...and having a big menu if you want to add somthing you have to go into every one of the pages and add or remove or edit what you want to do, but with somthing verry simple all you would have to do is edit one file, and all of the pages that have the PHP script on them would suddenly change to what that one file is.
So to start off if you are planning on using this little tirck, the page that you are putting the code on must be a .php page, so instead of 'index.html' it would be 'index.php' this changes none of the aspects of the page except for the fact that you can put php scripts in the page now, if you are unsure how to do this simply open the file in the editing program you use and when it asks what you want the name to be put 'THENAME.php" and it will be saved as a .php file..
now to the script...wherever you want the content of that one file to show, you will need to put this code
CODE
<?php include("FILE NAME.html"); ?>
you simply need to replace the FILE NAME with the name of the file in which you want to show. and if it is in a different directory put DIRECTORY/FIILE NAME instead...simple eh..
but now, for the file that you want to put on the pages...all you need to do is make a normal html file or any other file that you have that you want to include with the content, so if you want it to be a menu for example...
that could be saved as menu.html and you would just have to change FILE NAME to 'menu' and it should show up! just be sure that the file extention is .html *edit* edited it per Tyssen's post, now it DOES NOT have to be a .html file, i have tested it out and it works so that way you dont need to use .html, you can also use any other ones such as .php....who woulda guessed lol..thanx tyssen
well that is about it! my thanx to Phillip, aka webmaster_2006 for clearning up the matter of the page HAVING to be .php, for me!
*edit* edited it per Tyssen's post of clearing it up, thanx! it did mix it up a little>_<
thanx, Tyssen, i retyped a few things and hopefully it is clear now,
@ apollo, im sure that people who are making sites and dont use somthing like this and are just now finding out about somthing like this think differently, if you had 30 pages on your site all with a menu and you wanted to add one bloody page...would you want to go through and change all 30?
it may be a small thing compared to what else they may be able to do but i am sure some of the noobs find it allot more usefull than going through all of their files and changing it like i said above.
that can be done in html only..i dont see how that is php except that ure changing the index.php file thing..
You can't do PHP includes with HTML. By the way Albus, your file doesn't have to have an .html extension, it can be whatever you want - .php, .asp, .txt, .inc. The page that calls the include, rather than the include separately is what gets parsed, so it doesn't matter what format the include is in.
that can be done in html only..i dont see how that is php except that ure changing the index.php file thing..
well my friend calls it php, and call it php so i just called it php, we called it php because of the
CODE
<?[b]php[/b] include("FILE NAME.html"); ?>
php in the code needed to make it work.
@Tyssen, ok thanx, i believe you but i think i am going to also test that out before i edit the post because the person who taught me said it has to be a .html, if it works that way i will change it and if it does i will tell the person who told me, lmao..also if it is true thanx for advancing my knowledge in php :-D
i tryed to make my own php site, but it was too dificult, so i made it in html and take php forum, from phpbb.com. it is very nice forum, but i saw it almost everiwhere.
hmmn. I have seen a similar tutorial, somewhere in google. you sure, this is yours?
Notice from jlhaslip:
Tutorials in this Forum have a Review Process. Part of the review includes checking for plagarized material. Another part is to know the member, their ability and how they handle their account and whether they are capable of writing materials at the level indicated by the Tutorial they present. Please don't accuse any member of copying without support for your claim. Thanks.
This tutorial is ok but it's too simple I think and nothing so special for it.. but if you first hear about PHP and website making with PHP maybe it's something that can give a idea anyone.. Nice things but still i think it's way too simple.. sorry but thats the way it is.. ok nice tutorial and hope to see more of your tutorials
Now, that you don't need to have expensive software like Acrobat to create PDF. All you need is
Microsoft Office and a software name doPDF. You can download the freeware from
http://www.dopdf.com/download.php After downloading dopdf.exe, follow the instruction below 1.
Double click to install it, as display at image 1.jpg, choose a language and click OK 2. You will
see 2.jpg click next 3. Click I accept the agreement see 3.jpg, click next 4. Now you will see
4.jpg, select the folder to install it and click next 5. When seeing 5.jpg, This is the folder group
in Star....
This example will show you how use a string in VB to create PHP code. In order to do this, you need
a string to store your PHP page and a function that I will list at the bottom of the page for you to
put in a module. This code is written in VB.NET Public Sub CreatePage(ByVal HTMLTitle As
String, ByVal HTMLText As String, ByVal HTMLFileName As String) Dim strFile As String '
---------------------- ' -- Prepare String -- ' ---------------------- strFile = "" '
-------------------- ' -- Write Starter -- ' -------------------- strFile = " " ....
How To Extract The Audio From YouTube Videos This lovely simple tutorial will tell you how
to extract the audio from YouTube videos. Obviously , I am not in any way advocating that you take
copyrighted music that is available illegally in video-form on YouTube and extract the audio from
those videos rather than going down to HMV and buying the music. In this tutorial I will be using
the following video: http://uk.youtube.com/watch?v=gUhhRc5eWNw Firstly, you download the video,
which is simple. Just go to www.downloadyoutubevideos.com and paste the video....
Yes, I made some basic calculators to use for simple math problems, nothing big. I'm a newbie at
php, so if I made something that could be short, long, I am sorry. lol Here is one for adding two
numbers. CODE <html> <title>Adding 2 numbers </title> <body>
<h3 align="center">Type in the two numbers you'd like to add
together.</h3> <form action="add2.php" method="post"> <input
type="text" name="number1" /><p>+</p> <input type="tex....
Think that we have written a program, and some codes are wrong. We can go back to compiler and
change the code, and compile again. But I will show you how to correct our mistakes without using
the compiler. Let's start: I have written a program in Delphi. Let's see my mistake. I
have created a form like this. After this I wrote the codes in the Compare Button click as
below. CODE 1. procedure TForm1.ComparebuttonClick(Sender: TObject); 2. var
3. a,b:integer; 4. begin 5. a := StrToInt(EditA.Text); 6. b :....
Hello. I am BuBBaG. You can call me Bubba for short. I'm going to show you how to make an
Ultimate Game List. First off, we need to make a database, we are going to call this database
`my_db`, leave out the `'s. Inside that database we will need to create a table
called `ugl'(Ultimate Game List, duh). To make the table, simply enter this in the Syntax.
CODE CREATE TABLE ugl ( System char(50), Game char(50), ) In the
above code, it is stating we are creating a table called ugl, with two columns, System, and Gam....
JavaScript is very handy at making forms, allowing for much more customization and easier ways to
send data. So making Login forms using JavaScript may seem to many to be a very feasable idea.
However, JavaScript is very bad at protecting Passwords, as since the passwords are not encypted and
the whole JavaScript code is in the page, a person could just view the Page Source and find out
everything. Even if you use an external JavaScript, it would still be poor as the file name for the
external JavaScript would still be revealed. But I have an answer! There is a rela....
The quickest way to get a password protection system up and running is to use a Prompt box in
JavaScript that has a title like "Enter your Email Address". Only you and the relevant users know
what the password should be, could even be one each, that can be sorted out at the next page then
pass the "input" directly through the url by changing the .href, like
http://www.iSource.net.nz/users/?leTmeIn= The page that then processes this should also check for
the referring page, and three fails from an IP if you like the php (the next page): CODE
<?php // processdo....
Description Learn to create easy to edit content-only pages with php. By parsing your layout into
your pages, you can reduce file sizes and files will become much neater. Try it out Ok, lets
start by creating a file called template.php. CODE <?php
//--------------------------------- //Layout top section //---------------------------------
$top = <<< html <!-- include HTML header code here --> <body>
INSERT CODE FOR [b]TOP[/b] OF LAYOUT HERE. html;
//--------------------------------- //Layout bottom sec....
Hi - ill show you how to make a simple style sheet that will be embedded into your site. OK make
sure your site is set up already (like the standard tags) To start and end off a stylesheet you
need to do the following CODE <style type="text/css"> </stlye> Ok
lets start CODE <style type="text/css"> p { font-family: "Tahoma";
font-size: 9; color: "red"; } </style> So when you come to put in
CODE <p>Hi!</p> The text will appear red and will be in Tahom....
Recently, I had a need to make a FTP client, since our webhosting FTP server was kind of exotic, and
very restrictive, and most of uploads, even though they reach 100% would crash... File would be
uploaded to a server, but FTP clients just froze upon completion, waiting for the 226 (OK) from FTP
server... So, I had to make my own, one who would not wait for 226, but instead, watch the file
pload progress... This tutorial is not fuly complete, in the sense that it does not offer COMPLETE
FTP client functionality (for example, I ddn't write the code for FTP download, ....
ok part three now which covers the precusions setup of the small song i built for this tutorial.
the nesecery files can be downloaded here the image below is included in the precusions folder as
it mught not be entierly visable within this post so shold you need it its there also the images
purpose is to enable you to see what i am refering to within this tutorial lateron. now what i
have done above is blackd out every pattern that has nothing to do with the precusion. so the
patterns displayed in light grey are the only patterns i will be refering to. ok lets b....
Installing an AEF Forum on the Trap17 Server Preparation for Installing the AEF Forum
The following items are required for the installation of the packaage onto your site: 1. - a copy
of the AEF Forum zip package from http://anelectron.com/download.php 2. - a MySql Database 3. - a
Database User 4. - a password for the Database User 5. - Privileges allowed for the Database User
The details for ensuring that you have all of these items are as follows: 1. - a copy of the AEF
Forum zip package from http://anelectron.com/download.php . Simply browse to t....
Create a google seach result page embed within your site page. It is easier to create
web page that embeded the google search result in it. The first step is to go to google apply an
account for the google ad-sense. After that login to you account and choose the create ad-seach
option. Most of time the google search box give all we have the great and powerfull seach ability.
But, have you think every time users get seach with it. They do redirected to another page that is
not within you site. It is easier to create web page that embeded the google sea....
This is pretty simple but very useful if you don't want people to swear. We will be using
str_replace for this. CODE <?php str_replace ("curseword,
"replacemet"); ?> Thats pretty simple, just fill in the curse word and the
replacement, and then repeat... heres what it would look like full size: CODE <?php
str_replace("swear", "replacement"); str_replace("swear",
"replacement"); str_replace("swear", "replacement");
str_replace("swear", "....
Ok, for this tutorial i am only going to show you how to add updates to your site simply by storing
the information into a text file, and then displaying it with predefined formatting... OK lets get
down to business... Lets start out by making a PHP file and call it mycms.php put this code at
the top of the page. What this will do is allow us to edit the selected update when it comes time
and show and hide the add an update field and validate the form.. <script
language="javascript"> function ShowHide(id1, id2) { if (id1 != '') expMenu(id1)....
Im back again with what i think it would be an interesting tutorial for all of you guys who wants to
take flash out of the web and make really cool interactive CDS. First of all if all of you are
thinking right now: "this dude is wrong for making interactive cds you have to use macromedia
Director", well you are right macromedia director it's used to build interactive cds and dvds
among other things, but you can also make interactive cds with Flash, the thing is: if you want to
make a simple interactive CD you can totally do it with flash, of course Director brings ....
This tutorial shows how to transfer file of any size using winsock control. - Open VB; - Select
standard exe; - Press Ctrl + t to show the add component window; - Select winsock control and
microsoft common dialog; - Add one winsock control in the project; - Name it winsock1; - If you want
to add chat then add another winsock and name it winsock2; - Insert another winsock object if you
want to add chat also; - Add a microsoft common dialog box; - Name it cd; - We will use this
winsock1 object to transfer the file and winsock2 for chat; ------------- The basic idea : ....
I'm sure many of you out there have used phpBB at some point. To those who enjoy running forums
and online communities, specifically supporting phpBB, I am about to tell everyone how to restore
the forums database from one website, to another. This is presuming you do not have any mods or
hacks installed. Some of you may find this information useful. Here is the scenario: Let's say
you have forums running phpBB version 2.0.17 (currently the latest one). You have decided that you
want to move your forums to a whole new URL and provider, and as an added bonus, ch....
**** This tutorial will show you how to put files into .rar Archive and pass worded (if wanted)
**** What You Will Need Before continuing you will need a couple of thing, first of all you
need WINRAR , which is a very powerful archive manager. It can reduce size for you email
attachments, decompress RAR, ZIP and other types of files downloaded from the internet. You can get
winrar at http://www.rarlabs.com The other thing is that make sure your using Windows XP because
this is what I used to make this tutorial. I think it works with any other windows not....
Over the course of the summer I have tried hard to install a shoutbox into a new forum I was
developing. I went to the Invisionalize forums and found several mods for shoutboxes, but none of
them seemed to work. I first tried to install the D-Shoutbox, but upon this first try, I was
unsuccessful. Eventually, after much frustration, and trying other mods, which didn't seem to
stack up to Dean's features, I was determined to make it work. For some, editing your files (to
the newbie that is) can be difficult, with everything looking like a foreign language (basi....
This tutorial is meant for people that are dealing with problems while coding their site at 100% of
width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
file (take this in account when creating your website). How this script works. In the HEAD of your
HTML document will apply this command, so variable.js file will be load at start: CODE
<script type="text/javascript" src="variable.js"></script> In
browser JavaScript file variable.js is loaded. This Javascript file consist of this para....
How To: Change Your Website's Index File a simple trick using the .htaccess file A simple
tutorial which only involves editing one little file. Useful for those of us who have mime-typed
extensions or who are creating lots of test design files and want an easy way to make the design
they like best their default file. Create a file called .htaccess in the /public_html/ folder if
you don't have it. I think one should be there already when you get your site so if it isn't
you should create it anyway! In the file write the following: CODE Di....
WAP Site Tutorial : How to Make A Wap site? Before We begin.. Defination from the
Web about Wap. QUOTE WAP is an open international standard for applications that use
wireless communication . Its principal application is to enable access to the Internet from a
mobile phone or PDA .A WAP browser provides all of the basic services of a computer based web
browser but simplified to operate within the restrictions of a mobile phone. WAP is now the
protocol used for the majority of the world's mobile internet sites, known as WAP sites ....
Did you taking too much time to access your favorite sites? Probably the problem is on the server
used by those sites. To make sure that is the problem, use Windows PING facility. Ping is a small
program, which sends a 32-bit signal to the Web site server. Next, Ping record the time needed by
the server to answer it. To activate Ping: Click on the Start-Run menus, type command, and then
click OK. Type PING "site name" in the MS-DOS prompt window, for example PING www.yahoo.com. In a
moment, the result will appear on the screen. A result less than 300ms is normal spee....
I have included my coded file with this... Ok here is the code. CODE // //Create login area,
replace the phpBB2 in /phpBB2/login.php with your forum's //directory // <form
action="/phpBB2/login.php" method="post" target="_top"> <table
width="25%" cellspacing="2" cellpadding="2" border="0"
align="center"> <tr> <td align="left"
class="nav"><a href="/phpBB2/index.php" class="nav">Prank Place
Forum Index</a></td>....
In this tutorial, I'm going to show you how to test your PHP pages without the Internet or
uploading the files to your trap17 server. This tutorial is similar to doom's, but the links he
provided does not work, so I decided to make my own tutorial with working links. The program that I
will be using for this tutorial is called XAMPP . XAMPP is a modification of the popular Apache
server, and I'm using XAMPP because of its simplicity to install as well as maintain. The
current version of XAMPP is 1.4.13 and it has the following bundled in the download: QUOT....
Hello all, A little bit back I decided to make a quiz scriptjust out of no where lol. However it
doesnt do anything special but I am going to make an email mod for it so that it will email results
to your email address. So here is the basis of it. INSTRUCTIONS: Open a new page in your text
editor and paste in the following code. CODE <?php $qid = "Quiz ID-00"; ?>
<html> <head> <title><? echo "Gamers Pub $qid";
?></title> </head> <body> <p><h3><? echo "....
Hello all, Here is an easy Emailer or Contact system that allows visitors or members of your site
to email you just by filling out a form. So here is what you need to do to set it up. First open up
a new page in your text editor and paste in the following code. CODE <?php $Name =
$_POST['Name']; $Subject = $_POST['Subject'];
$Email = $_POST['Email']; $Site =
$_POST['Site']; $Message=$_POST['Message'];
$align = $_POST[....
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.