error:
Warning: main(/home/error-pr/public_html/test/news/0001.txt ) [function.main]: failed to create stream: No such file or directory in /home/error-pr/public_html/test/news/news.php on line 19
Warning: main() [function.main]: Failed opening '/home/error-pr/public_html/test/news/0001.txt ' for inclusion (include_path='') in /home/error-pr/public_html/test/news/news.php on line 19
code:
<?
$posts = file("config.txt"
;
$postcount = count($posts);
$postinfo = explode(":",$posts[0]);
$pages = $postinfo[1];
$totalposts = $postinfo[0];
echo "posts: $postcount\n Per Page:$pages\n Total: $totalposts\n";
if ($postcount==0) echo "No news is available!";
else
{
if (empty($startcount))
{
for($i=1; $i < $pages + 1; $i++)
{
if (!empty($posts[$i]))
{
$include_path = "/home/error-pr/public_html/test/news/$posts[$i]";
include $include_path; echo "<br><br>";
}
else
{
exit;
}
}
$startcount = pages+1;
echo "<form action=news.php method=post>
<input type=hidden name=startcount value=$startcount>
<input type=hidden name=endcount value=$startcount+$pages>
<input type=submit value=next>";
}
else
{
for($i=$startcount; $i < $endcount + 1; $i++)
{
if (!empty($posts[$i]))
{
include "DOCUMENT_ROOT/test/news/$posts[$i]"; echo "<br><br>";
}
else
{
exit;
}
}
echo "<form action=news.php method=post>
<input type=hidden name=startcount value=$endcount>
<input type=hidden name=endcount value=$endcount+$pages>
<input type=submit value=next>";
}
}
?>
i know its not perfect im jsut starting and im attempting to make a news thing that doesnt use a database.. the config.txt is a simple file formated like so..
10:5
0001.txt
0002.txt
0003.txt
and so on...
from the file it reads that there are 10 posts.. and it wants 5 posts on each page... then it will read the txt files (news posts) down the line..
i really dont want any other one.. im really trying to learn to use the code and stuff but im so fustrated right now.. i know the whole code may not look nice right now .. im just tryign to get the effin posts to POST
thanks for the help
im still messin with it o.0
in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?
Warning: main(/home/error-pr/public_html/test/news/0001.txt ) [function.main]: failed to create stream: No such file or directory in /home/error-pr/public_html/test/news/news.php on line 19
Warning: main() [function.main]: Failed opening '/home/error-pr/public_html/test/news/0001.txt ' for inclusion (include_path='') in /home/error-pr/public_html/test/news/news.php on line 19
code:
<?
$posts = file("config.txt"

$postcount = count($posts);
$postinfo = explode(":",$posts[0]);
$pages = $postinfo[1];
$totalposts = $postinfo[0];
echo "posts: $postcount\n Per Page:$pages\n Total: $totalposts\n";
if ($postcount==0) echo "No news is available!";
else
{
if (empty($startcount))
{
for($i=1; $i < $pages + 1; $i++)
{
if (!empty($posts[$i]))
{
$include_path = "/home/error-pr/public_html/test/news/$posts[$i]";
include $include_path; echo "<br><br>";
}
else
{
exit;
}
}
$startcount = pages+1;
echo "<form action=news.php method=post>
<input type=hidden name=startcount value=$startcount>
<input type=hidden name=endcount value=$startcount+$pages>
<input type=submit value=next>";
}
else
{
for($i=$startcount; $i < $endcount + 1; $i++)
{
if (!empty($posts[$i]))
{
include "DOCUMENT_ROOT/test/news/$posts[$i]"; echo "<br><br>";
}
else
{
exit;
}
}
echo "<form action=news.php method=post>
<input type=hidden name=startcount value=$endcount>
<input type=hidden name=endcount value=$endcount+$pages>
<input type=submit value=next>";
}
}
?>
i know its not perfect im jsut starting and im attempting to make a news thing that doesnt use a database.. the config.txt is a simple file formated like so..
10:5
0001.txt
0002.txt
0003.txt
and so on...
from the file it reads that there are 10 posts.. and it wants 5 posts on each page... then it will read the txt files (news posts) down the line..
i really dont want any other one.. im really trying to learn to use the code and stuff but im so fustrated right now.. i know the whole code may not look nice right now .. im just tryign to get the effin posts to POST

im still messin with it o.0
in the begining man created code.
in the end code will create man.
clones are coming only matter of time.
examples?