<meta http-equiv="page-enter" content="blendtrans(duration=4)"> Filter
2009-06-02
Tona in webbsidan
Html
2009-06-02
Genomskinliga boxar
Css
<style type="text/css">
<!--
#opacitetsbox {
background: #ffffff;
padding: 10px;
width: 350px;
opacity: 0.5; /* FF */
filter: alpha(opacity=50); /* IE */
}
-->
</style>2009-06-02
I stället för IFrame
Css
.scrollbox {
padding: 10px;
height: 100px;
width: 200px;
border: 1px solid #999999;
overflow: auto;
background-color: #F1F1EB;
}2009-05-29
Vertikal meny med pilar
Css
<? $thispage = basename($_SERVER['PHP_SELF']);
if (isset($_GET['item'])) { $item = intval($_GET['item']); } else { $item = 0; } ?>
<html>
<head>
<style type="text/css">
body {
background: #fff;
font-family: Verdana, sans-serif;
font-size: smaller;
}
ul { margin: 20px; padding: 0; list-style-type: none; }
li { margin : 0 0 5px 0 padding: 0; }
a { text-decoration: none; color: #666; }
a:hover { color: #000; }
.rightarrow {
font-size: 0; line-height: 0; width: 0;
border-top: 5px solid #fff;
border-right: 5px solid #fff;
border-bottom: 5px solid #fff;
border-left: 5px solid red;
float: left;
clear: both;
position: relative; top: 5px; left 2px;
}
.downarrow {
font-size: 0; line-height: 0; width: 0;
border-top: 5px solid green;
border-right: 5px solid #fff;
border-bottom: 5px solid #fff;
border-left: 5px solid #fff;
float: left;
clear: both;
position: relative; top: 7px; left: -3px;
}
</style>
</head>
<body>
<ul>
<? for ($i = 1; $i < 10; $i++) {
if ($item == $i) {
echo "<li><div class=\"downarrow\"></div>Selected menu item $i</li>\n";
} else {
echo "<li><div class=\"rightarrow\"></div><a href=\"$thispage?item=$i\">Menu item $i</a></li>\n";
}
} ?>
</ul>
</body>
</html>2009-05-17
Säkerhetstips
Security
Ett namnfält i ett formulär kan rensas från obehöriga tecken så här:
$mystring = preg_replace("/[^a-z 0-9åäöüæø]/i", "", $mystring);
php.ini:
disable_functions = file, fopen, popen, unlink, system, passthru, exec, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, phpinfo
expose_php = Off
display_errors = Off
log_errors = On
Apacheinställningar:
ServerSignature Off
ServerTokens Prod
# Följande är samma sak som att ställa in php-värdet i php.ini (som ovan)
php_value open_basedir /var/www/foo.bar/:/usr/local/php/:/tmp