You are here: How to process a local file rather than just read it « PHP Programming Language « IT news, forums, messages
How to process a local file rather than just read it

Posted by ashepster on 11/11/47 11:30

I can read a local file with

fopen("myFile.php");

However this gives me the source of the file (i.e. php code). I want
to get the results of the file after it has been evaluated (i.e. HTML).


The obvious way of doing this is

include 'myfile.php';

However, I want to process the evaluated result. For example:

echo htmlentities( include 'myfile.php' );

This doesn't work because the result of the include statement is true
or false rather than a string.

I'm sure this is very simple, but I'm just learning.

- Jeff -

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация