Re: [PHP] Multiple File Downloads

2007-12-14 Thread Benjamin Darwin
Aww, we have to wait all the way to Monday? It's fun to sit back and
watch the conversations on here!

And I call third-ed on that... is that the right word?

--Ben

On Dec 14, 2007 4:40 PM, Daniel Brown <[EMAIL PROTECTED]> wrote:
>
>
> You, too, Rob.  And to all else, make that seconded by me.
>
>Report back here Monday for another week of droning.
>
>
> --
> Daniel P. Brown
> [Phone Numbers Go Here!]
> [They're Hidden From View!]
>
> If at first you don't succeed, stick to what you know best so that you
> can make enough money to pay someone else to do it for you.
>
> --
>
>
>
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
Benjamin Darwin

President, Crew 99
(Insert Phone Number Here)
[EMAIL PROTECTED]

"Dream as if you'll live forever, live as if you'll die today." ~James Dean

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fwd: [PHP] Using PHP to remove certain number of bytes from file

2007-12-30 Thread Benjamin Darwin
Maybe one of these days I'll remember to actually reply to the list the
first time.


-- Forwarded message --
From: Benjamin Darwin <[EMAIL PROTECTED]>
Date: Dec 30, 2007 2:12 PM
Subject: Re: [PHP] Using PHP to remove certain number of bytes from file
To: Scott Wilcox <[EMAIL PROTECTED]>


Try this:

$file_data = file_get_contents('filename', false, null, 230);
file_put_contents('filename', $file_data);

This should do exactly what you need, although you may want to see if either
one returns false (indicating an error) and stop the script.

  On Dec 30, 2007 12:20 PM, Scott Wilcox <[EMAIL PROTECTED]> wrote:

> Is it possible with PHP to remove a certain number of bytes from a file,
> purely within PHP?
>
> If so, does someone have an example of doing this, removing the first
> 230 bytes from a file.
>
> Thanks,
>
> Scott.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Benjamin Darwin
[EMAIL PROTECTED]

"Dream as if you'll live forever, live as if you'll die today." ~James Dean


Re: [PHP] Newbie ' If Statement' Question

2008-03-14 Thread Benjamin Darwin
On Fri, Mar 14, 2008 at 7:56 PM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

> Hello Folks,
>
> I would like to be able to wrap a 'form' inside a php 'if statement' -  so
> that the form will appear if the 'if condition' is met.
>
> -  most likely I cannot have a  I'm doing other things wrong also...
> - now I get the error - Parse error: syntax error, unexpected T_STRING
> in...
>
> Q:  What is the best way to accomplish this goal?
>
>
> ---
>
> getField('testfield') !="") {
>print "
> 
> 
> 
> 
> 
>
> ";}else {print "Non Print";} ?>
>
>
>
> --
> Thanks - RevDave
> Cool7 @ hosting4days . com
> [db-lists]
>

Your first mistake I'm finding is the use of quotes. You started the print
with a ", which means the print ends at name=", and it's expecting more PHP
code, rather than a HTML string. The first fix would be to either escape all
quotes in the HTML with a slash (\) before it, or to change your opening and
closing quotes on the print to a single quote (').
Second, yes, you cannot enclose PHP tags inside PHP tags.  To do this,
change that portion to end the print, attach the two portions with a period
(.) and start up with the php function, then a period, and back to the
print.

Here's a fix that should work. I haven't tested it though, so I may have
missed one or two quotes.

getField('testfield') !="") {
   print "


getRecordId()."\">



";}else {print "Non Print";} ?>


[PHP] Version Control Software

2008-08-06 Thread Benjamin Darwin
After reading a topic on the list here about someone losing their website,
and having a minor mistake on my own that cost me a week's work on a file
(basically, tested the file, then uploaded to the live site and took the
daily backup off the live site.. only to find the file was messed up.. and
had to go to the weekly backup off cd to recover it, losing a week of
work)..

I'm wondering if anybody knows of a version control software program that
may fit my needs.

Basically, I'm looking for something that runs locally, not on the live
site, that I can edit the files on the dev computer, and store old versions
on the dev computer, and then just publish off of the local onto the live
site whenever I need to.

Anybody have any suggestons/ideas on how this should be done, and what
program is a good fit?

Thanks for any help,
Ben


Re: [PHP] Re: Version Control Software

2008-08-07 Thread Benjamin Darwin
On Thu, Aug 7, 2008 at 10:02 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote:

> Robert Cummings wrote:
>
>> On Thu, 2008-08-07 at 09:43 +1000, Ross McKay wrote:
>>
>>> On Wed, 6 Aug 2008 16:42:23 -0400, "Benjamin Darwin" wrote:
>>>
>>> [...]
>>>> I'm wondering if anybody knows of a version control software program
>>>> that
>>>> may fit my needs.
>>>>
>>>> Basically, I'm looking for something that runs locally, not on the live
>>>> site, that I can edit the files on the dev computer, and store old
>>>> versions
>>>> on the dev computer, and then just publish off of the local onto the
>>>> live
>>>> site whenever I need to. [...]
>>>>
>>> A couple of very easy-to-use ones are Subversion and CVS. Both are very
>>> easy to use from a shell / command line, and both have nice GUIs
>>> available for both Windows and *nix. Many editors and IDEs will work
>>> with CVS directly, and some with Subversion.
>>>
>>
>> While I currently use CVS, I probably wouldn't choose it going forward
>> since Subversion solves many of the problems it has... as does GIT if I
>> recall. I'm still using CVS because it works for me and I haven't
>> allocated the time yet to switch over.
>>
>
> Yeah I agree here. I wouldn't use CVS on any new project.
>
> For me the choices are simple: Git or SVN. Which one would depend on the
> kind of project (binary data?) and the team size/independent working
> requirements.
>
> Col


Thanks everyone for the opinions. I'm looking into Subversion and GIT, and
hopfully installating one (or both) to test later today.

--Ben