[HELP] Creatting and editting file
Hi! I'm here again u.u.
In this case i have to create and writting or delete a external file.. I do this : PHP Code:
The file is never created and can't edit anything or read it because it doesn't exist. Any help? My greets and thanks! & sorry for my english |
Re: [HELP] Creatting and editting file
write_file() does not go with fopen().
You need to use commands that work with fopen() like fputs() or fprintf() and the like. There is probably more that I don't know about but this is what I did see that is wrong. |
Re: [HELP] Creatting and editting file
But if i want to replace a line from the file?
How i would do it? |
Re: [HELP] Creatting and editting file
|
Re: [HELP] Creatting and editting file
But that code it's too large! I don't understand it :S
|
Re: [HELP] Creatting and editting file
Just put that stuff at the end of your file and all you need to do is use the functions. You don't really need to know anything. So the fact that it is "too long" means nothing. Just use the functions: ReplaceLineByNumber() and ReplaceLineByString().
:) |
Re: [HELP] Creatting and editting file
Sorry for my ignorance but if i want to add a text in the file how would i do?
If i want to replace a line by " " i would to use ReplaceLineByString, right? I don't know who serves of ReplaceLineByNumber.. :( Sorry again my ignorance. I want to learn the method |
Re: [HELP] Creatting and editting file
You can use this function:
Code:
Then do code like this: Code:
|
Re: [HELP] Creatting and editting file
This is for replace a line, and if i want to write a line? Sorry again :( I know how to code but this is new for me. :(
|
| All times are GMT -4. The time now is 13:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.