ljstott Posted December 25, 2011 Share Posted December 25, 2011 Ok I have been trying to work why my script that I have written out of the book. It is on page 4. When I test it. it comes up as html script. Here is the script. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Welcome To this Page! </title> <head> <body> <h1>This is a basic XHTML page!</h1> <br /> <p>Even with <span style="font-size:150%;">some</span> decoration, it's still not very exciting.</p> </body> </html> Thank you. ljstott. Link to comment Share on other sites More sharing options...
Jonathon Posted December 25, 2011 Share Posted December 25, 2011 What did you expect to see? Link to comment Share on other sites More sharing options...
ljstott Posted December 25, 2011 Author Share Posted December 25, 2011 A welcome to to this page. This is a basic XHTML page! Even with some decoration, it's still not very exciting. as shown in figure 1.2 on page 6. Link to comment Share on other sites More sharing options...
Jonathon Posted December 25, 2011 Share Posted December 25, 2011 I don't have the book. Do you mean its showing the code as opposed to the message I the last page. How are you opening this page? What url are you using? Link to comment Share on other sites More sharing options...
ljstott Posted December 25, 2011 Author Share Posted December 25, 2011 The book gives you the script to do with a text editor. then you are to test the script and see if come up the same as the book shows you. In the browser I open it up from file and open the go to the file that has the script in it. Here is the url that I have. C:\PHP\Chapter 1\welcome.html.txt the text editor I was using was pspad. it is a free text editor. Link to comment Share on other sites More sharing options...
Jonathon Posted December 25, 2011 Share Posted December 25, 2011 You've saved the file as .txt file not .html. I've never heard of your editor if you're on windows there are a few free decent editors. I prefer Context, but there is also notepad++ too. Both for Windows. If you're happy with your editor then just renane the file and remove the .txt extension. Link to comment Share on other sites More sharing options...
ljstott Posted December 25, 2011 Author Share Posted December 25, 2011 I did save the file as .html. I did as the book said to do. but saving it as html in a text content puts the txt after it anyway. I have renamed the file more than once and it keeps putting the .txt on it. I keep getting .html.txt after renaming the file. Link to comment Share on other sites More sharing options...
Jonathon Posted December 25, 2011 Share Posted December 25, 2011 You need to set the editor to save it as a .html file then. Or you can rename it just in windows as .html. Failing both that try a new editor and make sure to save the file as .html 1 Link to comment Share on other sites More sharing options...
ljstott Posted December 26, 2011 Author Share Posted December 26, 2011 I have already deleted the text editor and going to install context as you have recommend. I am also going to re-do the program again in this text editor and see if that will work. Thank you for the advise. It has been a great help. Link to comment Share on other sites More sharing options...
ljstott Posted December 26, 2011 Author Share Posted December 26, 2011 Ok I installed conTEXT and redid the program and it has work well almost. this one line of text came up. eta http-equiv="content-type" content="text/html; charset=utf-8/> I saved it as a html document not as a text. I am real happy with what has happen here. One line out of 13 is really good for someone that never did programming before. the line of script is where the header of the page is to go. Link to comment Share on other sites More sharing options...
Jonathon Posted December 26, 2011 Share Posted December 26, 2011 You've more than likely just missed the < off the start of a line. What was your code? Link to comment Share on other sites More sharing options...
ljstott Posted December 26, 2011 Author Share Posted December 26, 2011 you are right I did miss <. When I looked at what the script was and saw the mistake and made the changes. it now work. Here is the script. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Welcome to this page!</title> </head> <body> <h1>this is a basic XHTML page!</h1> <br /> <p>Even with <span style="font-size:150%;">some</span> decoration, it's still not very exciting.</p> </body> </html> Link to comment Share on other sites More sharing options...
Jonathon Posted December 26, 2011 Share Posted December 26, 2011 Good news the, glad its'w working for you. Link to comment Share on other sites More sharing options...
ljstott Posted December 27, 2011 Author Share Posted December 27, 2011 Jonathon you have been a great help thank you very much. Link to comment Share on other sites More sharing options...
Jonathon Posted December 27, 2011 Share Posted December 27, 2011 No problem, glad it works for you and you can get going. Link to comment Share on other sites More sharing options...
Recommended Posts