Hello,
i'm very new in programming lenguage, and i create a gallery with jquerymobile! but now i have a problem, i have many images and is impossible create address line by line..... And i fuond this solution, for load images from directory:
index.html
gallery1.html
but when i click on gallery for load image i have a blank page.
Where wrong?
Thanks.
i'm very new in programming lenguage, and i create a gallery with jquerymobile! but now i have a problem, i have many images and is impossible create address line by line..... And i fuond this solution, for load images from directory:
index.html
Code:
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li><a href="/mobile/gallery.php"> [COLOR=Red]<----- this is my call script[/COLOR]
<img src="../../mobile/backicon/panorama.jpg">
<h2>Panorama</h2>
<p>Click To See The Panorama Images</p>
<p class="ui-li-aside">Panorama Images</p>
</a>
Code:
<!DOCTYPE html>
<html>
<head>
<title>Gallery</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<link rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
<div data-role="page" class="page gallery-page">
<div data-role="header">
<!--<a href="gallery.html" data-icon="arrow-l" data-rel="back" data-direction="reverse">Back</a>-->
<a href="index.html" data-icon="home" data-direction="reverse">Home</a>
<h1>PANORAMA</h1>
</div><!--/header-->
<div data-role="content" class="full-width">
<ul class="gallery three-column-gallery" id="gallery">
<script>
<?php
$directory = "/[COLOR=Red]images[/COLOR]/";
if (is_dir($directory)) {
if ($directory_handle = opendir($directory)) {
while (($file = readdir($directory_handle)) !== false) {
if((!is_dir($file))&($file!=".")&($file!=".."))
echo "<li><a href=\"[COLOR=Red]images[/COLOR]".$file."\"><img src=\"/[COLOR=Red]http://www.wjunction.com/images/thumbs_[/COLOR]".$file."\" alt=\"Image 01\" /></a></li>";
}
closedir($directory_handle);
}
}
?>
</script>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
Where wrong?
Thanks.
Last edited: