Update index.php
This commit is contained in:
parent
ebe84b057f
commit
62233e932b
@ -62,16 +62,7 @@
|
|||||||
<div class="rantlist-bg">
|
<div class="rantlist-bg">
|
||||||
<ul class="rantlist">
|
<ul class="rantlist">
|
||||||
<?php
|
<?php
|
||||||
$path = "./content/";
|
$url = './content/test.json';
|
||||||
|
|
||||||
if ($handle = opendir($path)) {
|
|
||||||
while (false !== ($file = readdir($handle))) {
|
|
||||||
if ('.' === $file) continue;
|
|
||||||
if ('..' === $file) continue;
|
|
||||||
|
|
||||||
// do something with the file
|
|
||||||
|
|
||||||
$url = $file;
|
|
||||||
$content = file_get_contents($url);
|
$content = file_get_contents($url);
|
||||||
$json = json_decode($content, true);
|
$json = json_decode($content, true);
|
||||||
echo '<li class="rant-comment-row-widget" data-id="829770" data-type="rant"><div class="rantlist-title-text">';
|
echo '<li class="rant-comment-row-widget" data-id="829770" data-type="rant"><div class="rantlist-title-text">';
|
||||||
@ -81,10 +72,7 @@
|
|||||||
echo ' src="';
|
echo ' src="';
|
||||||
echo $json{src}; echo '" href="';
|
echo $json{src}; echo '" href="';
|
||||||
echo $json{href};
|
echo $json{href};
|
||||||
echo '" width=100%></ul></div>';
|
echo '" width=100%></ul></div>'
|
||||||
}
|
|
||||||
closedir($handle);
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user