Click to See Complete Forum and Search --> : My free dumb newbie question
The Air Strange
07-30-2003, 12:09 PM
Sorry, I'm the newbie here, so I hope that permits me one lazy/dumb question. :p
I have been running a site since last October, but about a month ago, my site when down and I had to change hosts.
I want to use this opportunity to learn a little more about html and to start using JavaScript.
I'm sort of overwhelmed at the moment, because I'm not certain what approach to take.
The site has upwards of 500 pages and I'm looking for a way to manage the pages and the code. Now, I am going to have to update all of the <a href> links to my new address.
When I do this, is there a bit of code I can use to simplify the process, or a shortcut, so if I have to change addresses in the future, I don't have to manually change the links on each and every page.
Thanks,
Culley
The site managment tools in Macromedia Dreamweaver are quite nice. You may want to look into that.
Also, you could look into using a serverside langage to write your links/menu dynamically to the page when it is called from the server. I personally use PHP to do this.
The Air Strange
07-30-2003, 12:34 PM
Thanks, I'll look into Macromedia.
Am I correct in my understanding that PHP, a serverside language, is the type of thing that I have to check with my server to see if I can use?
I have a "cgi-bin" set up in my account... is it safe to assume, then, that I have PHP capabilities?
Thanks,
Culley
Yes, you will have to check with your host. a cgi-bin is not required for PHP, and just because you have a cgi-bin doesn't mean that your server supports PHP. It might be quicker and easier for you to just try a quick PHP page rather than waiting for the folks at your server to resopond:
test.php (note the .php extention)
<?PHP
echo ("I have PHP!");
?>
The Air Strange
07-30-2003, 12:47 PM
Alright, it seems that I do. The page loaded correctly off of my website.
Thanks for the starting point. It's just nice to talk to get feedback from someone. I've been lurking on various forums and reading various tutorials for a couple months now, but couldn't decide how to get started :P I just figured that I should ask for advice on what to start with ASP, PHP, or what.
I've seen a number of sites that make great use of PHP and Macromedia. One being http://www.beck.com
I do know that my server doesn't support MySQL, will that cause me any problems if/when using PHP?
btw. I checked out your site, Infinity Pages, and it's very impressive! I really liked the layout and usage of Macromedia.
Culley
mySQL is only needed if you are going to be doing database work. To just include content on your pages, there is no need for it.
I'm glad you liked my site! There are a few things that I'm not happy with, but aren't there always? lol...
A site that we used PHP includes on was http://www.webdevfaqs.com You won't be able to see much from looking at the source, as you only see the output of the PHP code, but basically everything is included except the content on each page. This is great, because as we change the navigation menu, it automatically updates every page on the site.
A basic PHP include looks like this:
<?PHP
include ("yourfile.php");
?>So, if you want to include a menu on every page, it might go something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>PHP include demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div id="content">
<p>The following text consists of a mock Latin which has been based upon the average frequency of characters
and word lengths of the English language in order to reproduce a reasonably accurate overall visual impression.
Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor incidunt ut labore et
dolore magna aliquam erat volupat.</p>
<p>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor *** soluta nobis eligend optio comque
nihil quod a impedit anim id quod maxim placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe eveniet ut er repudiand sint et molestia
non este recusand.</p>
</div>
<?PHP
include ("menu.php");
?>
</body>
</html>where menu.php is:
<div id="menu">
<ul>
<li><a href="http://www.webdevfaqs.com">Web Dev FAqs</a></li>
<li><a href="http://www.infinitypages.com">Infinity Web Desing</a></li>
<li><a href="http://www.w3c.org">W3C</a></li>
</ul>
</div>
Zero-x252
07-30-2003, 01:30 PM
Heres a good shortcut i use on pages that are on my comp for fun i use
%THISDIRPATH%\*.*
where *.* = filname.filetype