WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 19.01.2002, 19:50   #1
Gironimo
Veteran
 
Registriert seit: 30.04.2000
Alter: 46
Beiträge: 490


Böse IIS:PHP "Permission denied..."!

folgendes Problem: ich hab einen Counter in einem PHP Skript eingebaut, allerdings bringt der Browser Fehlermeldungen. Im internen Browser vom Editor PHP Coder funktioniert es.

Ohne Counter funktioniert es. Die Einstellungen am IIS sollten eigentlich stimmen.

der Source:
<?php
$countfile = "count.dat";
if(! file_exists($countfile)){
$fd = fopen($countfile,"w+");
$count=0;
} else {
$fd = fopen($countfile,"r+");
$count = fgets($fd,100);
if (! $count)
$count=0;
}
rewind($fd);
$count++;
fwrite ($fd, $count);
fclose ($fd);

echo "<html>
<head>
<title>Gironimo's Site</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<link rel=\"stylesheet\" href=\"styles.css\" type=\"text/css\">
</head>

<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" alink=\"#000000\">
<table width=\"100%\" border=0 cellspacing=0 cellpadding=0 height=100% align=center>
<tr>
<td>
<div align=\"center\">


<img src=\"/images/gironimo.jpg\" width=493 height=162></p>


<font color=\"#666666\"><font size=\"1\" class=\"noformat\">SEND ME AN
<a href=\"mailto:gironimo20@gmx.at\">E-MAIL</a>!</font>
</font></p>
</div>
</td>
</tr>
<tr>
<td><div align=\"center\">Sie sind der " . $count . ". Besucher</div>
</td>
</tr>
</table>
</body>
</html>"
?>


die Fehlermeldungen:
Warning: fopen("count.dat", "r+") - Permission denied in G:\Inetpub\wwwroot\php\index.php on line 8
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 9
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 14
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 18
Warning: Supplied argument is not a valid File-Handle resource in G:\Inetpub\wwwroot\php\index.php on line 19


Kann der IIS nicht auf externe Dateien zugreifen? Der Include-Befehl funktioniert auch nicht, ich hab nämlich probiert, den Counter in einem externen File einzubinden. Aber ich hab gehört, dass der Include-Befehl unter Windows generell nicht funktioniert.(?)

Der Link: Mein php-Testserver

Thx for any advice
Gironimo
Gironimo ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 07:34 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag