我正在尝试创建一个我的网站访问计数器,我做了这样的事情:
contatore.txt:0
index.html的:
<html><head>
</head>
<body>
<p><?php include ("counter.php"); ?></p>
</body></html>
Run Code Online (Sandbox Code Playgroud)
counter.php:
<?php
$file_handle = fopen("contatore.txt", "r");
$line = ((int)(fgets($file_handle))) + 1;
fclose($file_handle);
$fh = fopen( 'filelist.txt', 'w' );
fwrite($fh, (string)($line));
fclose($fh);
echo ((string)($line));
?>
Run Code Online (Sandbox Code Playgroud)
这是问题:浏览器只是自动隐藏PHP代码使用:(你能帮助我吗??谢谢