php-general Digest 10 Nov 2011 05:15:27 -0000 Issue 7559
Topics (messages 315615 through 315620):
Re: delete and recreate
315615 by: Jim Giner
315616 by: Stuart Dallas
315617 by: Adam Richardson
315618 by: Jim Giner
315619 by: Jim Lucas
Hi!
315620 by: Jay S
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
This really doesn't tell me what you are trying to do.
--- End Message ---
--- Begin Message ---
On 9 Nov 2011, at 15:35, Kirk Bailey wrote:
> So, I want to create a script to delete an old file and create a new one
> which is empty. The script receives a password via query string. The obvious
> methods give me back a very useless 500 error. Any suggestions on how to
> accomplish what I seek?
First of all you need to sort out your development environment. Getting a 500
response from the server suggests that your server is set up to hide PHP error
messages from you. Are you, perchance, using Windows? I don't know what you
need to tweak to get it to show you PHP errors but others here may be able to
help you with that.
As far as your task goes it seems pretty straightforward. Use unlink() to
delete the existing file if file_exists() returns true, then use touch() to
create the new, empty file. Simples.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--- End Message ---
--- Begin Message ---
On Wed, Nov 9, 2011 at 10:35 AM, Kirk Bailey <[email protected]>wrote:
> So, I want to create a script to delete an old file and create a new one
> which is empty. The script receives a password via query string. The
> obvious methods give me back a very useless 500 error. Any suggestions on
> how to accomplish what I seek?
>
> --
> end
>
> Very Truly yours,
> - Kirk Bailey,
> Largo Florida
>
> kniht
> +-----+
> | BOX |
> +-----+
> think
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Make sure PHP has the permissions needed to delete and create files in the
directory.
Adam
--
Nephtali: A simple, flexible, fast, and security-focused PHP framework
http://nephtaliproject.com
--- End Message ---
--- Begin Message ---
Is anyone concerned about the OP's original statement about "receives a
password via query string". Perhaps that is his problem since he did
mention it? I didn't attempt to answer it because I didn't know what/why he
was prompting for a password.
--- End Message ---
--- Begin Message ---
On 11/9/2011 7:35 AM, Kirk Bailey wrote:
> So, I want to create a script to delete an old file and create a new one which
> is empty. The script receives a password via query string. The obvious methods
> give me back a very useless 500 error. Any suggestions on how to accomplish
> what
> I seek?
>
First, please include the at minimum the following information when asking a
question about a problem that you are having.
1) Operating System (Windows, Linux, etc...)
2) Web server type and version
3) PHP Version ( and how it is loaded in the web server )
3) Example code that you have tried.
a) What the code is doing.
b) What you expect the code to be doing.
--
Jim Lucas
http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/
H - (541) 323-4219
C - (541) 408-5189
O - (541) 323-9113
--- End Message ---
--- Begin Message ---
Hi,
Hope you are doing awesome!!
This is Jay from InstallMonetizer. I just wanted to follow up on my last email
see if you would be
interested in bundling our high quality advertisers into your software now.
As I had mentioned earlier, we can monetize your installs. :)
Our network has efficient tech optimization:
Average earnings per 1000 offer screens - $520
Some of our payouts are listed below:
USA - $1.00
UK - $0.40
Canada - $0.35
France - $0.35
Australia - $0.25
Germany - $0.30
Spain - $0.35
We monetize installs in most countries of the world (US and all international)
and send
payments globally.
Please let us know when you will be available for a quick chat.
Yahoo - dhaliwal.jasjeet
Skype - jay.installmonetizer
Please visit www.InstallMonetizercorp.com
To unsubscribe please click here {unsubscribe}
--- End Message ---