Im working with flat files, so Im trying to code a message were if the text file isnt there, it says something like "No comments yet"...But I keep getting the error that there is no file. Here is the php code for this message:
PHP Code:
<?php if ("2.txt") { include "2.txt"; } else { echo "There are no comments yet."; } ?>
But no matter what, I get this message as if the script it always trying to find "2.txt".
Warning: main(2.txt): failed to open stream: No such file or directory in /home/lerchism/public_html/blog/if.php on line 3
Warning: main(2.txt): failed to open stream: No such file or directory in /home/lerchism/public_html/blog/if.php on line 3
Warning: main(): Failed opening '2.txt' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lerchism/public_html/blog/if.php on line 3
thanks
|