Note of semiconductors site

Last Modified: 26 February 2023

php server information

To show the information of the php server, you can use a phpinfo.php file with the following little php script:
<?php phpinfo(); ?>
Back to top

Redirections

There're 3 ways to make a redirection function: The best redirection function is on the server side (in this case the php scripts). If your webhosting doesn't support server side scripting, than use the meta tag redirection function. Note: the time that I had used for the timers are 5 sec.
An articel about redirection (doorways).
Back to top

Character Encoding

In a XML document the character encoding of the document is specified on the XML declaration (e.g., <?xml version="1.0" encoding="iso-8859-1"?>). In order to portably present documents with specific character encodings, the best approach is to ensure that the web server provides the correct headers. If this is not possible, a document that wants to set its character encoding explicitly must include both the XML declaration an encoding declaration and a meta http-equiv statement (e.g., <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />). In XHTML-conforming user agents, the value of the encoding declaration of the XML declaration takes precedence.

To place the xml character encoding in a php file is the best way:

<?php echo '<?xml versio="1.0" encoding="iso-8859-1"?>' ."\n"; ?>

The include xml character encoding is only use with the DOCTYPE 1.0 Strict. The Character encoding and DOCTYPE of a xxx.php file looks like this:

<?php echo '<?xml version="1.0"?>' ."\n"; ?>
<!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>
Note: the "\n" will be replaced by a new line sign.
Back to top

Include function

This command inserts the text of another document or file into the parsed file. Any included file is subject to the usual access control. If the directory containing the parsed file has the Option Includes NOEXEC set, and the including the document would cause a program to be executed, then it will not be included; this prevents the execution of CGI scripts. Otherwise CGI scripts are invoked as normal using the complete URL given in the command, including any query string.

An attribute defines the location of the document; the inclusion is done for each attribute given to the include command. The valid attributes are:

file
The value is a path relative to the directory containing the current document being parsed. It cannot contain ../, nor can it be an absolute path. Therefore, you cannot include files that are outside of the document root, or above the current document in the directory structure. The virtual attribute should always be used in preference to this one.
virtual
The value is a (%-encoded) URL relative to the current document being parsed. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash (/) then it is taken to be relative to the current document.

A URL is constructed from the attribute, and the output the server would return if the URL were accessed by the client is included in the parsed output. Thus included files can be nested.

If the specified URL is a CGI program, the program will be executed and its output inserted in place of the directive in the parsed file. You may include a query string in a CGI url:
<!-- #include virtual="/cgi-bin/example.cgi?argument=value" -->

Include virtual should be used in preference to exec cgi to include the output of CGI programs into an HTML document.
Back to top

Last modified script

There're a lot of last modified script. The most scripts are JavaScript. The best way to do it is on server side like this:
<?php echo "Last Modified: ".date( "d F Y h:i", getlastmod() ); ?>

The script will be shown as:
Last Modified: 18 September 2008

Back to top

Message header

During designing and programming of a formmail I found out that by not using a message header the x-spam-status counter was about 4.9. When I added an user-agent (Microsoft Outlook), content-type (set as html) and mime-version. The x-spam-status was about 1.6. When I changed the user-agent into User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax), the Content-Type: text/plain; charset=us-ascii; format=flowed and Content-Transfer-Encoding: 7bit. The x-spam-status is about 0.5. With other words the header that I use for the formmail is not spamming.

The not spamming fake message header of the formmail is:

$headers .= "Mozilla Thunderbird 1.0.7 (Windows/20050923)\r\n";
$headers .= "X-Accept-Language: en,nl\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=us-ascii;
format=flowed\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
$headers .= "From: $email\r\n";
    

The reason for "\r\n" is RFC822, which specifies that line endings in e-mails must be "\r\n" instead of just "\n".

Back to top

Clear all

To stop floating the <div>'s I had used <br clear="all" /> in the first place. After testing the page and to look if the footer doesn't float to an empty space, I had the definition "clear=all" of <br> placed in the style sheet as br {clear: both;}. I tried clear: both in the #footer. It works only in IE6, not in NS7.1 and not in Firebird. That's why I have put a break element between the content and the footer.
Back to top

list type

There're three different list type namely:
unordered list
A list with e.g. bullets is called unordered list. The list consisted of <ul> and <li>. You can make a list with disc, circle and square.
Ordered list
An ordered list, created using the OL element, should contain information where order should be emphasized, as in a recipe.
Type Numbering style
1 arabic numbers 1, 2, 3, ...
a lower alpha a, b, c, ...
A Upper alpha A, B, C, ...
i Lower roman i, ii, iii, ...
I Upper roman I, II, III, ...
Definition list
Definition lists, created using the DL element, generally consist of a series of term/definition pairs (although definition lists may have other applications). Thus, when advertising a product, one might use a definition list.
Back to top

.htaccess file

You can use custom error pages for any error as long as you know its number (like 404 for page not found) by adding the following to your .htaccess file:
ErrorDocument errornumber /file.html

For example if I had the file notfound.html in the root directory of my site and I wanted to use it for a 404 error I would use:

ErrorDocument 404 /notfound.html

If the file is not in the root directory of your site, you just need to put the path to it:

ErrorDocument 500 /errorpages/500.html

These are some of the most common errors:

You also can use the type of application definition in the .htacces file:

AddType application/xhtml+xml .php .phtml .php3 .html

The same goes for the Character set of the webpages:

AddCharset ISO-8859-1 .php .phtml .php3 .html
Back to top