Welcome to WebmasterWorld Guest from 184.108.40.206
1. Let's say I've just written mystyle.css and I want it to apply to multiple .html documents. There are enough of them that opening each one, copy-pasting the <link rel>, and saving is not something I particularly want to do. Is there a way to use the server to say, "all files in directories x, y, and z, use mystyle.css"?
2. If so, is there any performance issue with using that method instead of the copy-paste method?
4. Is there a fancy way to rename files? For example, rename all filename.txt files in directory x to filename.html?
5. Does anyone know of a good tutorial for accessing and using your server for the first time? I checked the New To Web Development library before posting this, but none of the titles seemed to cover what I was looking for.
6. I'm also just beginning with mySQL. Although the tutorial I found is really helpful as to SQL commands, it doesn't cover something pretty basic--um, how to get info from the html input to your database and vice-versa, KUEK. Does anyone know of a database-html interaction tutorial intended for someone with a firm html base but zero experience with non-browser-side?
7. Are databases publicly accessible--that is, is it safe to just stick a username/password table for people who use my site into my SQL database?
8. I know how to use .htaccess to restrict who views certain files, but how are more user-friendly logins done? And what about showing the page but restricting certain actions: i.e. no posting to the page?
9. I know python and I've heard it's useful for this kind of stuff--but how do you write a .py file that makes HTML and databases do things?
Obviously, if you know the answer to one-some of my questions but not to all of them, post anyway!
By the way: I know there's lots of questions.... if you moderators want to break up this post or send parts of it to other forums, I won't be offended.
i'll answer a coupel of others for you anyway:
- passwords should be encrypted before storage.
depending on your application and location there may be strict requirements regarding how to handle passwords.
- there are many "application frameworks" that simplify the interface between web pages and databases.
- the method for renaming files depends a lot on the operating system on which they reside.
- if you are into unix-type systems you can do some cool text processing with awk.
many scripting languages are well suited to manipulating text files, specifically perl.
Assuming your server supports SSI, php or some other server side scripting language you might as well move on from static HTML pages. One basic function in php is the include.
Simple example using PHP:
<?php include($_SERVER['DOCUMENT_ROOT'] . '/somefolder/header.php'); ?>
<?php include($_SERVER['DOCUMENT_ROOT'] . '/somefolder/footer.php'); ?>
Lots of benefits. Firstly you're no longer relying on JS, the browser is sent plain HTML.
You'll want to either redirect your old HTML pages to the new ones if you switch to the .php extension. You could also have the server parse HTML files as PHP