Daevid Vincent is surprised that:
$num = 123;
$num = $num++;
print $num; //this prints 123 and not 124 ?!!
To me this is relatively logical. As I understand it, the post-increment
operator says do
something with the variable, and then increment it. The trouble in this case is
that we
are
I am well aware of the === operator, but I had an uneasy feeling that there was
still a
trap. However when I tried it it worked, so I was going to thank you for your
suggestion,
though I find the concept of having separate 'sort of equal' and 'truly equal'
operators
decidedly distasteful, but
On Sat, 03 Oct 2009 11:57:36 -0400, f...@thefsb.org (Tom Worster) wrote:
On 10/3/09 7:21 AM, clanc...@cybec.com.au clanc...@cybec.com.au wrote:
However there is one feature of PHP which, to my mind, is really bad design.
How many of
you can see anything wrong with the following procedure to
On Sun, 4 Oct 2009 14:52:36 +0200, an_...@hotmail.com (Andrea Giammarchi) wrote:
$a = 2260; $b = 226e1; $c = 2.26e3; $d = 2260.0;
$a==$b==$c==$d,
and
$b===$c===$d
$b , $c, and $d are the same indeed ... they represent the floating point
2260.0 in I think every language
On Tue, 6 Oct 2009 14:08:14 -0400, tedd.sperl...@gmail.com (tedd) wrote:
At 10:48 AM -0300 10/6/09, Martin Scotta wrote:
No matter how silly it can looks like (a = a++) it is still completely valid
code and it SHOULD run without problems.
Yeah, it's a valid as:
$a = $a;
and does the same
On Tue, 6 Oct 2009 12:15:54 -0400, tedd.sperl...@gmail.com (tedd) wrote:
At 3:56 PM +0200 10/6/09, Andrea Giammarchi wrote:
Does these behaves exactly?
for($i=0; $i10; ++$i)
for($i=0; $i10; $i++)
different benchmarks showed ++$i is usually faster than $i++
Faster is a relative term that
On Thu, 12 Nov 2009 09:45:55 -0800 (PST), stephe...@rogers.com (Stephen) wrote:
--- On Thu, 11/12/09, Chris Payne chris_pa...@danmangames.com wrote:
I have been asked to create thumbnails from the first page
of a PDF
document on the fly with PHP, I have looked online but am
confused as
On Sat, 21 Nov 2009 09:25:16 -0800, level...@gmail.com (Haig Davis) wrote:
Good Morning all,
Having a look at the time zone functions in PHP you can enter a time zone
city and get it's lat long. Does anybody know how you can run the function
in reverse (or know of a similar function) i.e. get
I have a flexible program, which can do many different things according to the
type of
data it is fed. Ideally the flexibility is achieved by calling different
functions,
though when the functionality is ill-defined I sometimes just include blocks of
code.
Ideally, from the point of program
On Wed, 6 Jan 2010 19:11:07 -0800, dae...@daevid.com (Daevid Vincent) wrote:
-Original Message-
From: Al [mailto:n...@ridersite.org]
Sent: Wednesday, January 06, 2010 5:09 PM
To: php-general@lists.php.net
Subject: [PHP] Re: PHP programming strategy; lots of little
include
On Wed, 06 Jan 2010 23:20:26 -0500, kolb0...@umn.edu (Daniel Kolbo) wrote:
Daevid Vincent wrote:
-Original Message-
From: Al [mailto:n...@ridersite.org]
Sent: Wednesday, January 06, 2010 5:09 PM
To: php-general@lists.php.net
Subject: [PHP] Re: PHP programming strategy; lots of
On Thu, 07 Jan 2010 22:48:59 -0500, rob...@interjinn.com (Robert Cummings)
wrote:
clanc...@cybec.com.au wrote:
Thank you all for your comments. I did not know about bytecode caches.
They're an
interesting concept, but if I am interpreting the paper
I am trying for the first time to use cookies. The manual contains the
statement Cookies
are part of the HTTP header, so setcookie() must be called before any output is
sent to
the browser.
When I first started using sessions, I was alarmed to read a very similar
statement about
sessions, but
On Tue, 19 Jan 2010 09:12:17 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote:
2010/1/19 clanc...@cybec.com.au:
I am trying for the first time to use cookies. The manual contains the
statement Cookies
are part of the HTTP header, so setcookie() must be called before any output
is sent to
On Tue, 19 Jan 2010 16:45:37 +0530, kranthi...@gmail.com (kranthi) wrote:
When I first started using sessions, I was alarmed to read a very similar
statement about
sessions, but I soon found that if I started my program with the statement
session_start(); I could then set up, access, modify
On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote:
The first setcookie call is empty which produces the errors that cause
the second cookie to fail.
I'm afraid not. I modified the program started to read:
?php //;V;;; Cypalda/Index.php Printed:
On Wed, 20 Jan 2010 13:19:03 +, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Wed, 2010-01-20 at 15:45 +1100, clanc...@cybec.com.au wrote:
On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote:
The first setcookie call is empty which produces the errors that
On Wed, 20 Jan 2010 20:05:42 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote:
2010/1/20 clanc...@cybec.com.au:
When you are working with sessions, provided you start your program with
session_id(), you
can then do anything you like with session variables at any point in your
program.
Hi,
On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote:
At 12:15 PM +1100 1/21/10, clanc...@cybec.com.au wrote:
On Wed, 20 Jan 2010 20:05:42 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote:
Well, I hope this information is helpful.
Yes, thanks to everyone who contributed.
On Thu, 21 Jan 2010 22:00:30 +, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Fri, 2010-01-22 at 08:58 +1100, clanc...@cybec.com.au wrote:
On Thu, 21 Jan 2010 08:54:44 -0500, tedd.sperl...@gmail.com (tedd) wrote:
At 12:15 PM +1100 1/21/10, clanc...@cybec.com.au wrote:
On Wed,
On Sat, 23 Jan 2010 09:32:37 -0500, tedd.sperl...@gmail.com (tedd) wrote:
At 1:13 PM +1100 1/23/10, clanc...@cybec.com.au wrote:
but I would be grateful for any suggestions how I
could make this procedure more secure.
We have given you advice that you should NOT use Cookies in any
fashion to
On Sat, 23 Jan 2010 15:10:11 +, nrix...@gmail.com (Nathan Rixham) wrote:
To answer your specific questions though - what can be done to make this
process more secure - no matter what approach you take, when working via
http and needing logged in / secure
I am using a Quadra Hosting Multi Domain (http://www.quadrahosting.com.au/) to
host five
different domains. As site owner I have FTP access to the root directory, and to
everything underneath it. There is no domain directly attached to the root.
Each domain
has its own directory tree under the
On Sun, 24 Jan 2010 17:44:16 +1100, clanc...@cybec.com.au wrote:
On Sat, 23 Jan 2010 15:10:11 +, nrix...@gmail.com (Nathan Rixham) wrote:
To answer your specific questions though - what can be done to make this
process more secure - no matter what approach
On Mon, 25 Jan 2010 18:31:54 -0800, deal...@gmail.com (deal...@gmail.com)
wrote:
On Jan 25, 2010, at 6:23 PM, Shawn McKenzie wrote:
file_put_contents() is s much easier.
Thanks Shawn I'll check that out ...
- I see it says : This function is identical to calling fopen(),
fwrite() and
On Tue, 26 Jan 2010 18:52:06 -0800, dae...@daevid.com (Daevid Vincent) wrote:
First of all writing pages in this old fashioned .cgi sort of way is so
1990's. Concatenating your whole page to a giant string is silly and
defeats the benefits (and purpose) of using PHP.
I'm actually in
On Tue, 26 Jan 2010 21:57:05 -0500, pa...@quillandmouse.com (Paul M Foster)
wrote:
On Tue, Jan 26, 2010 at 04:17:26PM -0800, Daevid Vincent wrote:
I'm not looking to start a holy war here or re-hash the tired debate.
I just want some hard cold numbers to look at.
Do you use a public
On Wed, 27 Jan 2010 10:21:00 -0800, deal...@gmail.com (dealtek) wrote:
On 1/26/2010 6:08 PM, clanc...@cybec.com.au wrote:
In principle this is extremely simple. Take your existing procedure to
generate the page
then:
1. $page = '';
2. Replace every echo 'whatever'; statement with $page
On Thu, 28 Jan 2010 21:10:42 +0100, rene7...@gmail.com (Rene Veerman) wrote:
On Thu, Jan 28, 2010 at 12:31 AM, clanc...@cybec.com.au wrote:
On Wed, 27 Jan 2010 10:21:00 -0800, deal...@gmail.com (dealtek) wrote:
Opening tables, etc, wrongly generally messes the page up completely, but
On Thu, 28 Jan 2010 13:39:31 -0800, mpet...@mac.com (Michael A. Peters) wrote:
clanc...@cybec.com.au wrote:
On Thu, 28 Jan 2010 21:10:42 +0100, rene7...@gmail.com (Rene Veerman) wrote:
On Thu, Jan 28, 2010 at 12:31 AM, clanc...@cybec.com.au wrote:
On Wed, 27 Jan 2010 10:21:00 -0800,
On Thu, 28 Jan 2010 16:23:05 -0500, pa...@quillandmouse.com (Paul M Foster)
wrote:
On Fri, Jan 29, 2010 at 08:17:34AM +1100, clanc...@cybec.com.au wrote:
On Thu, 28 Jan 2010 21:10:42 +0100, rene7...@gmail.com (Rene Veerman) wrote:
On Thu, Jan 28, 2010 at 12:31 AM, clanc...@cybec.com.au
On Thu, 28 Jan 2010 10:02:56 -0500, rob...@interjinn.com (Robert Cummings)
wrote:
I don't know what you guys are doing wrong but the following should be
the correct behaviour:
?php
function get_memory( $init=false )
{
static $base = null;
if( $base === null || $init )
{
I use Dreamweaver as my editor, mainly because I'm familiar with it, although I
only use
about 1% of its capabilities. However it generally handles long files well.
The other day
I downloaded the two shortest of Brian Dunning's sets of test data *. I opened
the
shortest in Dreamweaver, had a
On Mon, 01 Feb 2010 00:51:39 +, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Mon, 2010-02-01 at 11:28 +1100, clanc...@cybec.com.au wrote:
.
Don't use Dreamweaver then :p
Joking aside (Dreamweaver is a very capable editor, although it is quite
large for
On Fri, 29 Jan 2010 15:08:49 -0800, br...@briandunning.com (Brian Dunning)
wrote:
Thanks for the suggestions but I couldn't find any that suited my needs, so I
made my own. Feel free to download if you can use them, I made files with up
to a million unique records.
Name, Company, Address,
Recently I have frequently found, especially in the morning (GMT 2200 - 0200),
that I can
open a bookmark in the manual, for example
http://www.php.net/manual/en/ref.image.php.
But if I then do a search of any type I get 'The page cannot be displayed'. I
then cannot
reach any page, including
On Tue, 9 Feb 2010 16:09:05 +, rquadl...@googlemail.com (Richard Quadling)
wrote:
On 9 February 2010 14:20, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
On Tue, 2010-02-09 at 09:19 -0500, Robert Cummings wrote:
Richard wrote:
Hi,
I have extended the standard exception class to
On Thu, 04 Feb 2010 02:39:03 +0100, joc...@iamjochem.com (Jochem Maas) wrote:
Op 2/4/10 1:32 AM, clanc...@cybec.com.au schreef:
Recently I have frequently found, especially in the morning (GMT 2200 -
0200), that I can
open a bookmark in the manual, for example
I'm basically familiar with the UNIX permissions - 'owner', 'group', or
'other', but I
have no real idea how these apply to webpage users under PHP. I know that if I
FTP to the
server I am the owner, and I think that if I, or anyone else, opens one of my
webpages I
am 'other'.
However what I
On Wed, 10 Feb 2010 16:08:42 +1030, james.mcl...@gmail.com (James McLean) wrote:
On Wed, Feb 10, 2010 at 2:51 PM, clanc...@cybec.com.au wrote:
I'm basically familiar with the UNIX permissions - 'owner', 'group', or
'other', but I
have no real idea how these apply to webpage users under PHP.
On Thu, 11 Feb 2010 10:18:18 +, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Thu, 2010-02-11 at 10:16 +1100, Ross McKay wrote:
...
There's a good reason for OpenOffice having some difficulties with MS
Office documents. Back when MS rushed through getting their document
On Fri, 19 Feb 2010 13:19:50 -0500, st...@astroh.org (Michael Stroh) wrote:
I have a site I'm working on with some data that I want to be readable by
anyone, but some files that I want to keep hidden from outside users. Here is
an example of my file structure.
/products/data1/item_1/data.txt
Or:
$a = array ('Cats', 'white', 'Dogs', 'black', 'Mice', 'grey', 'Camels',
'brown');
$b = '';// Just in case it has some leftover
value
$k = 2* (int) (count ($a)/2); // ensure even no of terms
$i = 0; while ($i $k)
{
$b[$a[$i++]] = $a[$i++];
On Sat, 20 Feb 2010 17:44:00 -0500, you wrote:
On Sat, Feb 20, 2010 at 11:10 AM, Nathan Rixham nrix...@gmail.com wrote:
Richard Quadling wrote:
On 20 February 2010 11:18, clanc...@cybec.com.au wrote:
Or:
$a = array ('Cats', 'white', 'Dogs', 'black', 'Mice', 'grey', 'Camels',
'brown');
On Tue, 23 Feb 2010 14:49:01 -0800, d...@pointmade.net (Pointmade_Noah1) wrote:
I found this code below online and I am trying to modify it for my
needs. I want to pass a YEAR (Int) to the stored procedure and have it
create all the day in that passed year. With one tweak, If the day is
A week ago Dasn asked a question about converting arrays, and I quoted one
possible way of
achieving his task, using the operation:
$i = 0; while ($i $k) { $b[$a[$i++]] = $a[$i++]; }
I added the comment that I have always been wary of using statements like this
because I
was unsure when the
On Wed, 3 Mar 2010 08:21:06 -0600, halip...@gmail.com (haliphax) wrote:
On Fri, Feb 26, 2010 at 11:01 PM, clanc...@cybec.com.au wrote:
while ($i $j) { $b[$i] = $a[$i++]; } B.
You get $b[0] = $a[1], and so on (as you would expect).
Wouldn't that be $b[0] = $a[0], with the value
On Wed, 10 Mar 2010 09:52:30 -0500, aj...@alumni.iu.edu (Alice Wei) wrote:
Hi,
I have two arrays here that I have combined into a new array, as shown here:
$from = explode(-, $from);
$change = explode(-,$change);
$new_array = array_combine($from,$change);
I then tried reading it from a file
I had a procedure for listing the files on a remote directory recursively using
FTP, using
the code below. I thought it was working, but when I tried to use it yesterday
I found it
listed every second directory, and returned false for the others.
I then tried replacing line A with line B (shown
After a long battle to get my system back on air after a hard disk crash, I got
PHP 5.3.5
running under Apache 2.2.3. I now get a diagnostic every time I call date(),
complaining
about a missing parameter. The manual states that the second parameter is
optional, and
even phpinfo doesn't know
50 matches
Mail list logo