| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| PHP Script; file creator | |
|---|---|
| Tweet Topic Started: Mar 17 2005, 08:10 PM (744 Views) | |
| shockwave- | Mar 17 2005, 08:10 PM Post #1 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
hey, i just started off with PHP, and i know that there is a script that is avalible, but I'm not sure what it is. What I want, is a script that once someone submits some info, using a textarea or text input or whatever, it copies it onto a file, and gives them the link. I'd appriciate it if someone could provide a link or somthing.
|
![]() |
|
| Sani | Mar 17 2005, 08:30 PM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You want something that saves info into a text file, then gives a link to the file? If so,
It *should* work, have not tested it.. EDIT: BTW, I believe that this should be in Coding and Scripting.. ![]() EDIT 2: If in *nix/linux servers, the folder containing the script has to be chmodded to 777.. Although maybe 666 would work..
|
![]() |
|
| shockwave- | Mar 17 2005, 08:56 PM Post #3 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
does not seem to work. All that happens, once i submit my info, is the URL changes to this: http://www.mysite.com/somedirectory/filecreator.php?act=save |
![]() |
|
| Rory | Mar 17 2005, 09:22 PM Post #4 |
|
i;m a mess
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Topic Moved |
![]() |
|
| Ben | Mar 17 2005, 09:30 PM Post #5 |
|
Quantum-locked when observed.
![]()
|
Yes, because the function is there but it isn't being called. PHP is case-sensitive when it comes to variables, so $Submit is different from $submit. Plus, if you have register_globals off, it might not work without using the $_POST array.Change your code to this:
|
![]() |
|
| shockwave- | Mar 17 2005, 10:02 PM Post #6 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
Hmm.. Well, when i do type in some info, then hit submit, it comes up with a couple of errors at the bottom, then gives me a link to the file, Then, when i do click the file, it's a 404 Error. I can't seem to figure out why it's not working. |
![]() |
|
| Sani | Mar 17 2005, 10:46 PM Post #7 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Use this:
It works, Already tested it..
|
![]() |
|
| shockwave- | Mar 18 2005, 04:33 PM Post #8 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
um.. doesn't work for me. Same thing happens as last time. it doesn't actually create the file. Am i doing somthing wrong? |
![]() |
|
| Seth | Mar 18 2005, 04:42 PM Post #9 |
|
I has a pony
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
If you're on a Linux server, you must CHMOD the directory to world-writable (0777) before being able to create files in it. |
![]() |
|
| shockwave- | Mar 18 2005, 05:13 PM Post #10 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
uh huh... like i said, i'm pretty new to PHP and stuff, so could someone explain that? |
![]() |
|
| Seth | Mar 18 2005, 05:24 PM Post #11 |
|
I has a pony
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
![]() I love that picture. Clicky!
|
![]() |
|
| shockwave- | Mar 27 2005, 10:30 PM Post #12 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
oh, man. It worked. Thanks Seth. ![]() Oh, this probably isn't possible, but hey, PHP can do a lot of things. I want to avoid my disk space overrunning. Is there a way I could make it delete the file in X amount of days? Also, is there a way that i can get the file makers' IP addresses (to avoid spammers)
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
6:25 PM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)





PHP is case-sensitive when it comes to variables, so $Submit is different from $submit. Plus, if you have register_globals off, it might not work without using the $_POST array.
I love that picture. Clicky!
6:25 PM Jul 11