PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old June 22nd, 2004, 07:07 AM
corbendallas corbendallas is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 corbendallas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry including a file but not processing its contents (when php tags occur)

I am trying to include files in a form field (textfield) but I don't want the PHP within the
document to process. Is there any way to do that?

For instance.

<textarea cols="90" rows="25" name="register_tables"><? include("client_register_tables.php");?></textarea>


Would anyone know how to process that file without having it parse? (because when it parses, it displays errors)
I tried importing just a .txt file but it still tries to process that file (because ith as PHP tags in it)

Reply With Quote
  #2  
Old June 22nd, 2004, 07:25 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
So you're wanting just to display the PHP code? Instead of including the file, consider opening it and printing its contents, wrapped in htmlentities() or one of the similar functions to change < and > tags to &gt; and &ltg tags.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #3  
Old June 22nd, 2004, 10:30 AM
corbendallas corbendallas is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 4 corbendallas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I already tried that, the problem is that the tags within the textarea will be
reexported once they are submitted again (throug hte form) Which means they
will have to be intact. I just want them to be imported (into the textarea) without running.

Reply With Quote
  #4  
Old June 24th, 2004, 11:08 PM
bala_kumar2k4 bala_kumar2k4 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 12 bala_kumar2k4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up

Try this,

<textarea cols="90" rows="25" name="register_tables"><? echo highlight_file("client_register_tables.php");?></textarea>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > including a file but not processing its contents (when php tags occur)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway