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;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function loadImageBits(canvasId, bits) {
|
||||
alert(canvasId);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -202,11 +208,13 @@
|
|||
// show content
|
||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||
if ($myfile) {
|
||||
$index = 0;
|
||||
while (($line = fgets($myfile)) !== false) {
|
||||
echo "<div class='post'><h2>" . $line . "</h2>";
|
||||
echo "<i>" . fgets($myfile) . "</i>";
|
||||
echo "<div>" . fgets($myfile) . "</div></div>";
|
||||
// <canvas style="width: 100%;" width="128" height="64"></canvas>
|
||||
echo "<canvas id=\"c" . $index . "\" onload='loadImageBits(\"c" . $index . "\", " . fgets($myfile) . ")' style='width: 100%;' width='128' height='64'></canvas></div>";
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
fclose($myfile);
|
||||
|
|
Reference in a new issue