Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic php website

Status
Not open for further replies.

lennon123

Technical User
Apr 12, 2008
19
GB
Hiya Guys
I need to build a simple website using css and php. The site will only have 8 pages, with a header and footer that remain constant. Can soneone tell me how the structure of a php site works? i know css pretty well
many thanks
lennon123
 
Hi and welcome to Tek-Tips. Please read faq222-2244 which will give you a guide on how to get the best from these forums.

Then look at the FAQ page for this forum where you will find several starter guides.

Then decide what specific PHP functionality that you need - remembering that most of your page will be simple HTML anyway.

Then come back with any specific PHP queries and we will try to answer them.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
What exactly do you need from PHP? Is there going to be a database to connect to for instance, or do you need tome dynamic content management.

PHP would help you there, but the construction of a website, remains HTML and CSS. Its not the website structure but what the website will do that requires PHP.
So until you can tell us what it is you want to have PHP do for you in the website I would agree with johnwm.







----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Ok thanks, Im pretty new to php - What I would like to be able to do is have all my text loaded in externally from a text file. Is this possible with php? Also how do I format the text file so that it displays correctly when/if it is loaded in
thanks
 
This is indeed possible with PHP.

Your text file would need to be formatted, like HTML, only lacking the <html><head><body> tags. Basically it should look like a bunch of text with whichever html tags you need to give it format. such as DIVS and Spans, etc...

Then you would have PHP read the file and display it.

Functions such as file() or fopen() and fread() would help you there.

Then its just a matter of putting the contents of the file into a variable, and echoing it out wherever it is you want to show it.


There plenty of examples in the entries for those functions in the php.net online manual.

Click the function name to go to the php.net online manual entry for it.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
thank you very much! im new to forums... dont know why i didnt start using them earlier. cheers for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top