Jump to content

Basic PHP Include Code Errors.


fantasticham

Recommended Posts

Here's the code, it's never failed me before.

<?php 
include("$a.txt"); 
?>

 

So I threw that in main.php and uploaded news.txt to test it. So presumably, on my webspace main.php?a=news should include the news file. But I keep getting the same errors, that the news.txt file can't be found.

 

http://www.fantasticham.com/main.php

http://www.fantasticham.com/main.php?a=news

http://www.fantasticham.com/news.txt

 

Any help would be appreciated.

Link to comment
https://forums.phpfreaks.com/topic/136655-basic-php-include-code-errors/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.