基本上,我正在建立一个数字艺术项目。
For this I am aiming to get a webpage to show how many visits its had by displaying an image for every visit. So basically every time someone visits or refreshes the web page a new image will appear; 50 visits = 50 images and so on. I want the images to be taken from a folder on the server at random. I have code for a basic visit counter, but it only works for sessions. I need to edit this code so that for every visit a random image appears. Apparently it should be fairly simple but I am very new to php and am still learning a lot.
这是我为访问反省而制定的守则:
session_start();
if(isset($_SESSION[ views ]))
$_SESSION[ views ]=$_SESSION[ views ]+1;
else
$_SESSION[ views ]=1
echo "Page views: ".$_SESSION[ views ];
Any help would be hugely appreciated :) Thanks for your time.