![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Aug 2002
Location: East Coast.
Posts: 2,251
|
PHP - Parsing PHP in includes
I'm trying to include() a file that has a .txt extension. What I'd like to do is parse some PHP on that text file as well.
It's not working What I have done is set .txt as php parsable in htaccess. No go. Any ideas? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: May 2002
Location: MI
Posts: 1,827
|
Why not just make the .txt a .php extension and include it?
Otherwise maybe you can try something like the eval function http://us2.php.net/eval and see if that works. -- below may or may not work for you -- $text = join('', file('/path/to/text/file')); echo eval($text);
__________________
Latest MMA news. http://www.mmawrapup.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
have it as .php and dont forget about opening and closing php tags <? ... ?> inside the include file.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
|
Quote:
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |