fatalcure wrote:change this:
Code: Select all
for ($i=0; $i <= sizeof($myArray); $i++) {
to this:
Code: Select all
for ($i=0; $i <= sizeof($myArray) - 1; $i++) {
that will get rid of the error.
I've basically writtin the whole script for you, some things u have to figure out on your own, if you only want it to be publised on that day, play around with the if ($date >= $filedate) statement.
Im still getting that error.
Warning: Failed opening 'files/' for inclusion (include_path='.;c:\apache\php\pear') in c:\apache\htdocs\test\test.php on line 38
Even with the correction.
Line 38=
include($path);
And I've been playing around with (on the older code)
if ($date >= $filedate)
And the results are:
if ($date >= $filedate) = shows content of files in directory prior to and including today's
if ($date = $filedate) = shows content of all files in directory including future dates.
if ($date <= $filedate) = shows content of files in diretory for future dates including today.
if ($date < $filedate) = shows content of files in diretory for future dates not including today.
if ($date > $filedate) = shows content of files in directory prior to today.
But now im getting it listed out of order:
test 8-7-2002 (file name 7 August 2002.html)
test 8-8-2002 (file name 8 August 2002.html)
test 8-9-2002 (file name 9 August 2002.html)
test 8-12-2002 (file name 12 August 2002.html)
test 8-10-2002 (file name 10 August 2002.html)
test 8-11-2002 (file name 11 August 2002.html)
8-10 and 8-11 files were ceated after 8-12 file (all three posted on 8-8).
I've been playing with the code all day, and these are the questions Im coming up with. PHP.net doesn't address any of these concerns since 90% of the answers deal with managing with a database, which I am not running. If i had a database to work with, I wouldn't have to be concerned with 90% of this. Working from flat file systems suck, but Im stuck with it.