<html>
<head>
<title>php.ini</title>
<body>
<?
echo 'get_magic_quotes_gpc = ' , get_magic_quotes_gpc() , "<br>\n";
echo 'display_errors = ' , ini_get('display_errors') , "<br>\n";
echo 'register_globals = ' , (int)ini_get('register_globals') , "<br>\n";
echo 'post_max_size = ' , ini_get('post_max_size');
?>
</body>
</html> Filter
2007-05-08
Kolla inställningarna
Php
2007-05-08
Beräkna bildernas storlek
Php
foreach (scandir("img") as $value) {
if (substr($value, -4) == ".png") {
$a = getimagesize("img/$value");
echo "<img src=\"img/$value\" {$a[3]} alt=\"\" /><br />";
}
}
/* Alla egenskaper (även mime mm)...
foreach (scandir("img") as $value) {
if ($value != "." && $value != "..") {
$a = getimagesize("img/$value");
foreach ($a as $key => $value) {
echo "$key = $value<br />";
}
echo "<hr />";
}
}
*/ 2007-04-24
Hängslen och livrem
Javascript
<a href="" onclick="if(confirm('Sure?')){return confirm('ABSOLUTELY SURE?');}else{return false;}">Delete</a> 2007-04-19
Renare webbsida i windows
Javascript
function blured() {
for (a in document.links) document.links[a].onfocus = document.links[a].blur;
}
if (document.all) {
document.onmousedown = blured;
} 2007-04-19
Räknare
Asp
<%
dim fs, ts, path, number
if not session("counted") then
'Get current filename and path
path=Request.ServerVariables("PATH_TRANSLATED")
'Calculate filename
path = Left(path, instrRev(path, "\")) & "count.dat"
set fs = Server.CreateObject("Scripting.FileSystemObject")
'Open file for reading
Set ts = fs.OpenTextFile(path, 1, True, -2)
number = -1
if not ts.AtEndOfStream then number=int (ts.ReadLine) + 1
ts.Close
'If reading succeded
'Open file for writing
Set ts = fs.OpenTextFile(path, 2, False, -2)
if number < 1 then number = 1
ts.WriteLine number
ts.close
session("counted")=true
session("visitor")=number
set ts = nothing
set fs = nothing
end if
%>