loading image bits prep
This commit is contained in:
parent
2d8b74f6a1
commit
3ae452806b
1 changed files with 10 additions and 2 deletions
12
index.php
12
index.php
|
@ -94,6 +94,12 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function loadImageBits(canvasId, bits) {
|
||||||
|
alert(canvasId);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
@ -202,11 +208,13 @@
|
||||||
// show content
|
// show content
|
||||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||||
if ($myfile) {
|
if ($myfile) {
|
||||||
|
$index = 0;
|
||||||
while (($line = fgets($myfile)) !== false) {
|
while (($line = fgets($myfile)) !== false) {
|
||||||
echo "<div class='post'><h2>" . $line . "</h2>";
|
echo "<div class='post'><h2>" . $line . "</h2>";
|
||||||
echo "<i>" . fgets($myfile) . "</i>";
|
echo "<i>" . fgets($myfile) . "</i>";
|
||||||
echo "<div>" . fgets($myfile) . "</div></div>";
|
echo "<canvas id=\"c" . $index . "\" onload='loadImageBits(\"c" . $index . "\", " . fgets($myfile) . ")' style='width: 100%;' width='128' height='64'></canvas></div>";
|
||||||
// <canvas style="width: 100%;" width="128" height="64"></canvas>
|
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
|
|
Reference in a new issue