php-general Digest 25 Dec 2004 12:44:43 -0000 Issue 3190
Topics (messages 205155 through 205163):
Simple code to replace one line?
205155 by: Aaron Paulley
205156 by: Greg Donald
Re: Merry Christmas ;o]
205157 by: Greg Donald
205160 by: Matthew Sims
Re: hackers?
205158 by: Greg Donald
Re: Question about dates
205159 by: Greg Donald
Re: Shifting banner on re-display [SOLVED]
205161 by: Andre Dubuc
Mandrake 10.1
205162 by: GH
205163 by: Greg Donald
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 ---
Can someone help me out with a little bit of simple code please?
I know that the line in a file that I want to replace completely is
line number 9.
Is there a simple function I can use to replace that line?
Thanks,
Aaron
--- End Message ---
--- Begin Message ---
On Fri, 24 Dec 2004 19:08:03 -0500, Aaron Paulley <[EMAIL PROTECTED]> wrote:
> I know that the line in a file that I want to replace completely is
> line number 9.
>
> Is there a simple function I can use to replace that line?
php -r 'system( "sed 9s/.*/replacement/g old > new" );'
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---
--- Begin Message ---
On Fri, 24 Dec 2004 20:45:28 -0300 (ART), Alaor Barroso
<[EMAIL PROTECTED]> wrote:
> Merry Christmas and happy new year for all that is
> part of php community, god bless us. Peace!
Same. :)
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---
--- Begin Message ---
> Merry Christmas and happy new year for all that is
> part of php community, god bless us. Peace!
>
How is this PHP? Please consult the Christmas mailing list.
JUST KIDDING! Happy holidays. :)
--
--Matthew Sims
--<http://killermookie.org>
--- End Message ---
--- Begin Message ---
On Thu, 23 Dec 2004 21:01:57 -0800 (PST), Chris Shiflett
<[EMAIL PROTECTED]> wrote:
> This is the least effective means of auditing an application. Letting an
> experienced person review your code is much, much better.
I agree.
But feeding ';drop table blah' sql into the GET query is much, much more fun.
:)
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---
--- Begin Message ---
On Fri, 24 Dec 2004 08:46:28 -0600, Brent Clements
<[EMAIL PROTECTED]> wrote:
> How does one over come the issue of unix time not going beyond a certain date?
Overcome the issue in what way? A 32bit integer is what it is.
> ie, when I do echo strtotime("2099-10-08"); it outputs -1
So don't use strtotime(). You're never going to fit an integer with
more than 32bits into a memory space of 32bits or less without losing
bits. The PHP manual seems pretty clear in what to do as far as
checking for failure:
$str = 'Not Good';
if (($timestamp = strtotime($str)) === -1) {
echo "The string ($str) is bogus";
} else {
echo "$str == " . date('l dS of F Y h:i:s A', $timestamp);
}
> This has to do with the limitations of unix time, so how does one get around
> it?
If it's stored in a db, you can use the date/time fields which usually
provide more storage space than 32bits. MySQL has timestamp for
example.
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---
--- Begin Message ---
Hi List,
This is an 'oldie' thread, but since I found out what caused the odd behavior,
I thought it would be nice to pass on the solution.
Toying around with it last week, I suddenly remembered that often when I
manipulated an image in The Gimp, sometimes the image would move slightly
off-center or down a shade. If that image was then saved, those changes,
minute as they were, would magnify if the image was displayed at increased
width. Result => image might shift an inch shift up or down. A rather
embarrassing but obvious error, if one knew where to look. . .
Re-centering and saving the images solved the problem. Thanks again to all who
offered suggestions.
A Blessed Christmas to all.
Andre
Hi Mark,
Tried your idea - no go.
Somehow I think the problem may be related to the banner's gif width (set at
101%). I recall when I first made the banner, which has a horizontal rule (a
png) above it set at 100%, that the HR caused some problems. Perhaps I should
toy more with the combo.
Thanks for the suggestion.
Regards,
Andre
On Saturday 13 November 2004 07:42 pm, Marek Kilimajer wrote:
> What if you try:
>
> <?php include("banner.php"); ?>
> <form action="bad.php" method="post">
>
> Andre Dubuc wrote:
> > Hi,
> >
> > I have a very annoying problem with pages that re-display using the <form
> > action tag>. On re-display the banner, which is set absolute position at
> > 0px, shifts down by about an inch. I've isolated the cause to the <form
> > action tag>.
> >
> > Simplified code for bad.php page:
> >
> > <?php session_start(); ob_start(); ?>
> > /* html head style body tags */
> >
> > <form action="bad.php" method="post">
> > <?php include("banner.php"); ?>
> >
> > <input type="submit" name="submit" value="Add Names"
> >
> > /* closing form body html tags */
--- End Message ---
--- Begin Message ---
This may be off topic.. but does anyone know what versions of PHP and
MySql Mandrake is shipping with 10.1 Offical?
Thanks
--- End Message ---
--- Begin Message ---
On Sat, 25 Dec 2004 00:27:54 -0500, GH <[EMAIL PROTECTED]> wrote:
> This may be off topic.. but does anyone know what versions of PHP and
> MySql Mandrake is shipping with 10.1 Offical?
>From these advisories it looks like 4.0.20.
http://www.mandrakesoft.com/security/advisories?name=MDKSA-2004:119
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---