[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] PHP and include?



GREAT!!!

I wondered how to make it honor carriage returns!

Thanks!

Doug Simpson
Technology Specialist
DeQueen Public Schools
DeQueen, AR 71832
simpsond leopards k12 ar us
Tux for President!

On Wed, 11 Oct 2006, Scott Sherrill wrote:

Doug Simpson wrote:
I want to be able to have a raw text file displayed in a certain spot on a web page without a user having to edit the actual web page.

If I am thinking correctly, there is an include function on php that will do this, but I need the syntax. Also, if possible, I need it to pull the txt file from the users' public_html folder.

Is this what you are looking for Doug?

http://webservices.remc1.net/playground/

there are two files in that folder

one called test
and one called index.php

test just includes a copy/paste of your message

index.php is 5 lines:

<?
print "<pre>";
include "test";
print "</pre>";
?>

I added the pre tags so that it honored the carriage returns you added.

The text file could have been anywhere it did not need to be in the same directory.

Just specify the path to the file in the include:

include "/home/scott/pathtofile/test"


Scott

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]