Page is a not externally linkable
greencode - 2:10 pm on Jul 23, 2012 (gmt 0)
Hi. Thanks once agin for your relpy…
I'm now getting the following error:
Warning: asort() expects parameter 1 to be array, object given in /home/mysite/public_html/dev/index.php on line 31
Here's the actual page code - Not really sure where to begin!?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="scripts/jquery.cycle.all.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#main').cycle({
fit: 1, pause: 2
});
});
</script>
<link rel="stylesheet" href="reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="container">
<div id="header">
<div id="logo"></div>
</div>
<?php
$directory = 'images/slideshow';
try {
// Styling for images
echo "<div id=\"main\">";
$slidefiles = new DirectoryIterator($directory);
asort($slidefiles);
foreach ($slidefiles as $item ) {
if ($item->isFile()) {
$path = $directory . "/" . $item;
echo "<img src=\"" . $path . "\" />";
}
}
echo "</div>";
}
catch(Exception $e) {
echo 'No images found for this slideshow.<br />';
}
?>
<div id="footer">
<div class="details aleft">content</div>
<div class="icon"></div>
<div class="details aright">content</div>
<div class="clear"></div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</html>