[Pro] Problem with php include

Earlier today I had the following code in a markup item:

Thank You. You have selected:
<?php include ("http://www.mydomainhere.com/deleteme.txt"); ?>

And this happily showed the text in “deleteme.txt” after the word 'selected: ’

After renaming the page, it doesn’t seem to work any more!

Can anyone suggest why it would stop working? The file “deleteme.txt” is being overwritten from form items on another page, and viewing it on the server shows that it’s there, and contains the text that it should.

It’s just not showing up in the markup item’s box like it did before!!

Thanks. Philip


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Your host may have upgraded the server to a new version of PHP.
include() only brings the file into the current scope, but it doesn’t
implicitly “print” its contents.

This might help, assuming the file is where you think it is:

<? print file_get_contents('./deleteme.txt'); ?>

You may have to mess with the path a little bit, file_get_contents()
may accept a relative path, or it may need something more specific
than that, like /home/yourname/srv/www/folder/deleteme.txt or
something equally awful.

Walter

On May 30, 2009, at 10:42 AM, Philip Caplan wrote:

Earlier today I had the following code in a markup item:

Thank You. You have selected:
<?php include ("http://www.mydomainhere.com/deleteme.txt "); ?>

And this happily showed the text in “deleteme.txt” after the word
'selected: ’

After renaming the page, it doesn’t seem to work any more!

Can anyone suggest why it would stop working? The file
“deleteme.txt” is being overwritten from form items on another page,
and viewing it on the server shows that it’s there, and contains the
text that it should.

It’s just not showing up in the markup item’s box like it did before!!

Thanks. Philip


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options