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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I test page before uploading? 4

Status
Not open for further replies.

nelljack

Technical User
Dec 23, 2001
337
0
0
US
I am not sure if this is the right place for this question but I'll ask anyway.

I've read there is a way to test a page one is building with all of its graphics, css,etc while the files are on ones own PC. Is this true? If so, how do you put the code to read from your own HDD? I have lost the paper I was reading.

Any help will be appreciated. I'm new at web pages, can't you tell?
 
we can tell, all right. you could view your page by opening the page in a browser. go to [tt]File > Open[/tt] and go to the file that you wish to see.

if you have server-side scripts, you could get a copy of Apache at [tt][/tt] and install it appropriately. if you truly are a beginner, you don't have any server-side scripts yet unless you jumped into the advanced bandwagon too early. :)
 
You can do some testing (as aidz98 said) by browsing to your web pages by File > Open. In addition, assuming you're using Windows, you could install the Microsoft Personal Web Server (an optional component on your Win98 CD) & run this. PWS will serve up SSI's & CSS etc. One by one, the penguins steal my sanity. X-)

 
If i am reading it right its even easier than the guys suggested.
Place all the graphics, CSS, files etc into one folder and just link to them using their file names, no need for addresses etc
f they are in different folders check the file properties and copy their address on the hard drive, use this address as their URl.
for example adding your iamge
<img src=&quot;c:\windows\images\image1.gif&quot; alt=&quot;image&quot;>
etc


É enzo@endamcg.com
 
cian, that's not a good idea :-(
If you do that, then it won't work when you upload your site to the web!
It's always best to use absolute addressing
(eg.[tt]<img src=&quot;/images/image1.gif&quot; alt=&quot;image&quot;>[/tt]) One by one, the penguins steal my sanity. X-)

 
Of course, but I meant just for the purposes of testing the site on your hard drive.
Thats why i said first to put all files into the same directory so you only need to link by filename! :)
Then again the best would be to set up the same directory system you indend to use on your web server.

É
enzo@endamcg.com
 
If you use relative addressing instead of absolute addressing on your images and links you can test a lot easier. You can use the same directory structure on both your local pc and your web server. Of course, by relative addressing I mean:
Code:
<img scr=&quot;./images/picture.gif&quot;>
References the image from the images subdirectory of the current directory, regardless of which machine it's on. You don't really need the initial &quot;./&quot;, but it seems to help, especially for included css and javascript files. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks all for your help. Each got a point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top