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:
  #1  
Old June 23rd, 2004, 08:51 AM
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
Post how to edit the contents of .php file

Actually,I want to display one php file to textarea,alter it,and putting the resultant value to that php file i simply i want to edit it.Here I got the output from text area correctly.But when appending it to the .php file,it doesn't works.
ie fopen("----.php","a+");
Is it possible..

Can any one help me......

Thank u..

Reply With Quote
  #2  
Old June 23rd, 2004, 01:03 PM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
I imagine you'll want to do fopen ("----.php", "w"); this will rewrite the file each time and then you can put the contents of the textarea into it. If you open it for append then you'll add everything in the textarea on to the end of the file. Not sure what "a+" does but don't think its what you want in this case.

Hope this helps,

-KM-

Reply With Quote
  #3  
Old June 24th, 2004, 12:10 AM
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
Arrow

It doesn't works for write mode also,..ie fopen(---.php,"w")Is there any other way to do this.....
Thank u

Reply With Quote
  #4  
Old June 24th, 2004, 05:08 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
Can you be a bit more specific please. Just saying "it doesn't work" makes it hard to find the problem. Post your code, error messages it generates and describe the faulty behaviour. That makes it a lot easier to find out where the problem is.

Thanks,

-KM-

Reply With Quote
  #5  
Old June 24th, 2004, 09:17 AM
Pheifel Pheifel is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Denmark
Posts: 174 Pheifel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 46 sec
Reputation Power: 5
Send a message via MSN to Pheifel
<input type = "textarea" value = "<? include "file.php"; ?>">

this should do the job.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > how to edit the contents of .php file


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 6 hosted by Hostway
Stay green...Green IT