PDA

View Full Version : Need help with include('file')!



Zizzled
08-19-2011, 03:37 PM
Ok so i have this textfile thats called post.php, and it writes this text file called: Recieve.txt

When i try to include Recieve.txt in the code below it will not work..No idea what im doing wrong.. o.O


<html>
<head>
<meta http-equiv="refresh" content="5">
<title>Realtime Logs</title>
</head>
<body>
<center><b>This was created by Jason [MrZizzled]. If you purchased this from someone other than me, please request a refund!</b></center>

<?php include("Recieve.txt"); ?>

</body>
</html>

Bob Barr
08-19-2011, 04:57 PM
Several possible problems:

1) PHP isn't enabled (in your .htaccess file) for the file type your page uses. (Does a php line that doesn't use the 'include file' work?)

2) The file Receive.txt is not being created correctly. (Can you check it manually to ensure that it contains what you expect it to?)

3) The file is being created in a folder other than the one in which the page calling it is located. (You may need to specify the path to use.)

4) The filename used to create the file isn't using the same case as the one the include specifies. (In Linux, Receive.txt and receive.txt are two different files.)

siguie
08-20-2011, 03:47 AM
I know this shouldn't make a difference but for whatever reason my php includes need to have the absolute location like "/home/DOMAIN/SUBDIRECTORY/file.txt"


Just give it a try and see if that solves anything. :)