On Tue, 15 Sep 2009 13:47:06 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Tue, 2009-09-15 at 13:45 +0100, Richard Heyes wrote:
Hi,
It is good to hear that they teach PHP in kindergarden these days.
I've heard it's soon to be part of the national curriculum here in the UK.
On Tue, 15 Sep 2009 11:55:51 -0400, oorza...@gmail.com (Eddie Drapkin) wrote:
On Tue, Sep 15, 2009 at 11:35 AM, Rahul S. Johari
sleepwal...@rahulsjohari.com wrote:
the amount of cores, several dozen perhaps. Like I said, I'm not too
familiar with Apache, so I'd do some research and
On Fri, 4 Sep 2009 14:58:55 +0200, ralph_def...@yahoo.de (Ralph Deffke) wrote:
Hi all, I'm a bit under stress, maybe somebody knows the regex on a snap.
using PHP_EOL would be great.
Here is a function which works for files pasted from browser screens:
function clean_up($dirty_file)
{
On Fri, 21 Aug 2009 15:16:11 +0200, ak...@telkomsa.net (Arno Kuhl) wrote:
-Original Message-
From: Clancy [mailto:clanc...@cybec.com.au]
Sent: 21 August 2009 01:26 PM
To: php-general@lists.php.net
Subject: [PHP] Invoking functions stored in a separate directory?
I am developing an idea
On Sat, 22 Aug 2009 20:37:17 +0930, robl...@aapt.net.au (David Robley) wrote:
Clancy wrote:
$ok = include (HOST_PATH.'/Halla.php');
Because you are assigning the result of the include to a variable. Try
include (HOST_PATH.'/Halla.php');
and it will work as you expect. And similarly
On Sat, 22 Aug 2009 14:02:58 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Sat, 2009-08-22 at 13:00 +0100, Richard Heyes wrote:
Hi,
Is there a way to round down to the nearest 50?
Example: Any number between 400 and 449 I would 400 to be displayed; 450
to 499 would be
I am developing an idea for a website engine which can be shared between
several different
websites. Each website would have its own directory under a common root
directory, and the
engine would be in a separate directory Engine:
Root
Website_1.com, Website_2.com, Engine
The website
On Wed, 19 Aug 2009 08:13:56 -0400, kyle.sm...@inforonics.com (Kyle Smith)
wrote:
Nitebirdz wrote:
On Wed, Aug 19, 2009 at 11:59:39AM +0100, Ashley Sheridan wrote:
No, what you're saying is 'use a log file in order to know when to look
at another log file'. What would happen if you
On Sun, 16 Aug 2009 23:24:05 -0600, george.lang...@shaw.ca (George Langley)
wrote:
is_dir()
http://ca3.php.net/is_dir
is_file()
http://ca3.php.net/manual/en/function.is-file.php
I specifically asked about FTP under PHP. As far as I can see neither of these
references
have anything to do
On Sat, 15 Aug 2009 10:33:07 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
On Sat, 2009-08-15 at 09:56 +0200, Ralph Deffke wrote:
can u upload ur own files ?
can u create a directory ?
Yes.
are u using a ftp client ?
No; I'm using straight PHP FTP
Clancy clanc
I have just got access to a new server, and am playing with upload/download
procedures. I
looked in the root directory, and see several objects which I assume to be
directories.
However I was surprised to find there does not appear to be any command to
determine if an
object is a file or
On Sat, 8 Aug 2009 07:53:42 -0400, tedd.sperl...@gmail.com (tedd) wrote:
You don't need the width=210 height=300. For example, this works:
div class=pfm
img src=Images/Nx.jpg
p class=nrmltextnYanni Nx /p
p class=notetextnSally Riordan Scholarship, 2007- /p
/div
I have
On Fri, 07 Aug 2009 06:32:48 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
...
How, for example, could I otherwise achieved the following effect, which
displays an image
with a border slightly darker than the background, and with the title and
subtitle inside
the border?
On Thu, 06 Aug 2009 08:28:32 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan)
wrote:
...
Nested tables are the devils playthings!
I must be the devil, then. I enjoy playing with them. And if they're done
right they
seem to work on every system I have tried them on. Granted
Thank you to all of you who have commented on this query.
On the subject of comments, I feel that Larry Garfield settled this query by
pointing out
that halving the size of a particular document gave a barely noticeable
increase in speed.
Paul Foster pointed out the problem of maintenance, but
On Wed, 5 Aug 2009 09:25:20 -0400, phps...@gmail.com (Bastien Koert) wrote:
On Wed, Aug 5, 2009 at 8:02 AM, Ashley Sheridana...@ashleysheridan.co.uk
wrote:
On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote:
Thank you to all of you who have commented on this query.
On the subject of comments, I
Is anyone here interested in discussing programming strategy, or or know of a
discussion
group which is interested in the subject?
The sorts of questions I am interested in are:
1. I have a highly variable program which always shows the same page, but which
includes
different modules to give
On Wed, 29 Jul 2009 13:42:23 -0400, p...@logi.ca (b) wrote:
I'm trying to figure out how to test if a string matches *exactly*
another string, using a regexp pattern.
If this is REALLY what you want to do, what is wrong with strcmp?
--
PHP General Mailing List (http://www.php.net/)
To
Does anyone know of an extension/utility that will enable PHP to write backup
files to a
CD/DVD?
Ideally I would like the CD to appear as 'just another drive'.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Sun, 5 Jul 2009 14:33:07 -0600, govinda.webdnat...@gmail.com (Govinda) wrote:
I am confusing myself reading the docs just now.
i.e.:
include_path
basename()
and dirname()
I had thought from many months ago that
?php include '/somedir/somefile.php'; ?
would include
somefile.php
living in
On Tue, 09 Jun 2009 12:22:22 -0400, rob...@interjinn.com (Robert Cummings)
wrote:
Craige Leeder wrote:
I'm not sure I agree with NEVER using else. Sometimes else is a very
logical way to organize code. However, it should not be used for data
validation IE:
function
I have a recursive procedure, and I set the time limit each time I enter it:
function rec_scan($directory, ..)
{
set_time_limit (1);
if (is_dir($new_file))
{
rec_scan ($new_file, )
}
}
The
On Sun, 07 Jun 2009 13:04:20 +0200, p...@computer.org (Per Jessen) wrote:
Clancy wrote:
I have a recursive procedure, and I set the time limit each time I
enter it:
function rec_scan($directory, ..)
{
set_time_limit (1);
if (is_dir($new_file))
{
rec_scan ($new_file
On Mon, 1 Jun 2009 12:53:31 +1000, angusm...@pobox.com (Angus Mann) wrote:
Hi all. I realize this is more an HTML question than PHP but I'm sure someone
here can help.
I have several forms with lots (dozens) of text inputs. If the user presses
the Update button I want the form handled by
On Sat, 30 May 2009 14:31:26 -0400, af.gour...@videotron.ca (PJ) wrote:
So, if corn is bad, eating it will get rid of it faster right? :p
No it will turn you into a corn cob! ;-)
Which is why Christopher Columbus found the Americas uninhabited! ;-)
--
PHP General Mailing List
On Mon, 25 May 2009 02:11:24 -0400, pa...@quillandmouse.com (Paul M Foster)
wrote:
.
This is why I originated a thread along these lines some time ago. I
sympathize with your pain, being a C programmer as well. Apparently, PHP
plays fast and loose with types when doing == comparisons.
For some time I have been working on a text based database, in which each entry
contains
one or more lines of data, with the various fields delimited by semicolons, e.g.
A;b;20GM;Restaurant;090508
n;;;Arintji;;
a;Federation Square;;;
p;9663 9900;;;9663 9901;;i...@arintji.com.au;
All was
On Thu, 07 May 2009 09:33:00 -0400, f...@thefsb.org (Tom Worster) wrote:
On 5/6/09 9:31 PM, Clancy clanc...@cybec.com.au wrote:
I can understand your reluctance to disregard your mother's advice, but
unfortunately she
had been brainwashed to accept the dogma of the day.
actually, i don't
On Wed, 06 May 2009 08:54:14 -0400, f...@thefsb.org (Tom Worster) wrote:
...
clancy, i can't argue with you. my desired usage of break is really just a
cover-up for a goto. i know.
it makes no logical sense but i think i'd sooner adopt oop than gotos. my
mom taught me to program back
On Tue, 05 May 2009 14:13:23 -0400, rob...@interjinn.com (Robert Cummings)
wrote:
On Tue, 2009-05-05 at 13:56 -0400, Tom Worster wrote:
there's a control structure i wish php had: a simple block that you can
...
But PHP 5.3 introduces goto:
?php
header:
if( $something ) ...
On Thu, 16 Apr 2009 09:26:52 -0500, nos...@mckenzies.net (Shawn McKenzie) wrote:
Stuart wrote:
2009/4/15 Don d...@program-it.ca:
I have some code in my index.php file that check the user agent and
redirects to a warning page if IE 6 or less is encountered.
1. I'm using a framework and so
Apart from the out of place '1', apparently treated as '1000', which I threw in
out of
curiosity, the string comparison gave the expected results, but I cannot see
the logic of
the raw comparison. Can anybody explain these results?
Clancy
If anyone is suspicious the actual code I used
On Wed, 11 Mar 2009 13:03:19 -0500, halip...@gmail.com (haliphax) wrote:
On Wed, Mar 11, 2009 at 12:44 PM, Shawn McKenzie nos...@mckenzies.net wrote:
Clancy wrote:
It is my understanding that when you open a page the PHP server looks for
index.php in the
site root directory, and loads
On Tue, 10 Mar 2009 09:59:53 -0400, gwp...@ptd.net (Gary) wrote:
Thanks again for all the help.
I created a simple page of all includes (header, menu, 3 columns). I mixed
the file types up. The menu (projectseven PMM) I saved as a library item,
works fine. Had an HTML file in there, but I am
It is my understanding that when you open a page the PHP server looks for
index.php in the
site root directory, and loads it. As a result the working directory of the
page will be
the root directory of the site. I have always worked on this assumption, and
it has
always been correct. On the
On Tue, 10 Mar 2009 15:12:57 +, stut...@gmail.com (Stuart) wrote:
Please keep the discussion on-list.
2009/3/10 Clancy clanc...@cybec.com.au
Hi,
After I posted my message to the group today I realised that my program
achieves its
almost infinite flexibility by loading different include
On Mon, 9 Mar 2009 10:07:33 +, stut...@gmail.com (Stuart) wrote:
...
As in the example script I've posted above you can refer to the current
working directory with a single period (.), but this is still relying on the
current working directory being what you expect it to be.
Thank you!
On Sun, 8 Mar 2009 09:01:18 +, stut...@gmail.com (Stuart) wrote:
2009/3/8 Clancy clanc...@cybec.com.au
I want to index the files on a website recursively. The program will run in
the site root
directory, which GETCWD reports as D:/Websites/Website_1. I can open any
file in the root
On Sun, 8 Mar 2009 12:33:15 +, stut...@gmail.com (Stuart) wrote:
2009/3/8 Clancy clanc...@cybec.com.au
On Sun, 8 Mar 2009 09:01:18 +, stut...@gmail.com (Stuart) wrote:
2009/3/8 Clancy clanc...@cybec.com.au
I want to index the files on a website recursively. The program will run
On Sun, 8 Mar 2009 01:54:22 +0600, le...@phpxperts.net (9el) wrote:
They probably thought you couldn't handle the responsibility... and if
you can't think for yourself then they may be right ;)
Once we have goto, it's a short slide down a slippery slope to setjmp
and longjmp. And thence,
I want to index the files on a website recursively. The program will run in the
site root
directory, which GETCWD reports as D:/Websites/Website_1. I can open any file
in the root
directory simply using its file name; Joe.dat, for example, and I can opendir
for any
subdirectory; eg
On Fri, 6 Mar 2009 08:53:44 -0500, danbr...@php.net (Daniel Brown) wrote:
On Fri, Mar 6, 2009 at 00:12, Clancy clanc...@cybec.com.au wrote:
Don't take me too seriously on this. But it riles me that the same peoplewho
threw out the
GOTO as being too dangerous could then introduce the break
On Fri, 6 Mar 2009 05:51:36 -0800 (PST), seanodot...@yahoo.com (Sean O) wrote:
Another good website-on-a-stick software is... well, WOS (now called MoWeS --
Modular Webserver System).
http://www.chsoftware.net/en/useware/mowes/mowes.htm
The nice thing about this software is the ability to
On Fri, 6 Mar 2009 08:58:17 -0600, halip...@gmail.com (haliphax) wrote:
I wholeheartedly concur. The first programming language I taught
myself was BASIC about 23 years ago. We may never see the inclusion
of GOSUB in PHP, but GOTO is certainly worthwhile.
Side note: I
On Wed, 04 Mar 2009 17:51:11 -0500, af.gour...@videotron.ca (PJ) wrote:
This is probably a mysql question, but their list is rather dull - I
think they don't appreciate my humor. Beside this list is fun ... and
informative.
Anyway, I can't figure this out. I am trying to verify inputs on a form
On Fri, 06 Mar 2009 10:16:47 +1100, dmag...@gmail.com (Chris) wrote:
Rather than encoding all the variable names into one long unwieldy set of
statements, I
would put them all into an array, and then use a loop to process the array.
This way all
the variable names are together, and the
I bought some appliance recently, and found that they had thrown in a 2G USB
key for good
luck. I guess I ought to be able to put a PHP server plus a copy of my website
on it for
demonstration purposes, but has anyone actually tried it, and if so are there
any traps to
avoid?
Thanks,
--
PHP
systems, but I have had very little to do with UNIX.
This discussion reminds me of the Any key as in:
Support person now press any key. User but there isn't an Any key on my
keyboard!
Clancy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have been pondering whether it would be feasible to work with a 100,000 entry
index
file, and had put yesterday aside to do some timing tests. I first generated
some sample
index files of various lengths. Each entry consisted of a single line with the
form
ASDF;rhubarb, rhubarb,
where
On Tue, 24 Feb 2009 10:25:25 +0100, joc...@iamjochem.com (Jochem Maas) wrote:
Clancy schreef:
I have been experimenting using four character alphanumeric keys on an
array, and when I
generated a random set of keys, and then used ksort to sort the array, I was
very
surprised to find
I have been experimenting using four character alphanumeric keys on an array,
and when I
generated a random set of keys, and then used ksort to sort the array, I was
very
surprised to find that if the key contained any non-numeric character, or if it
started
with zero, the key was sorted as a
I have a function to process a data file. This process opens the file, and
then calls
another function to process each entry. This function in turn calls another
function to
process each line of the entry. A set of fairly complex arrays specifies how
all the
possible types of entries and
On Sat, 14 Feb 2009 07:41:28 +0800, a...@pc86.com (LKSunny) wrote:
?
$a = array(a, b, c, d);
/*
how to list:
abcd
abc
ab
ac
ad
bcd
bc
bd
cd
a
b
c
d
who have idea ? thank you very much !!
*/
?
If you are talking about arrays of strings,use my function larec (list array
recursively).
This has
While PHP has a lot of nice features, it also has some traps which I am forever
falling
into. One which I find particularly hard to understand is how mixed mode
comparisons work.
For instance
$string = 'elephant';
If($string == 0) returns true;
If($string != 0) returns false;
If($string ===
On Thu, 12 Feb 2009 23:47:31 +0800, huixinc...@baidu.com (???) wrote:
Jochem Maas wrote:
Clancy schreef:
While PHP has a lot of nice features, it also has some traps which I am
forever falling
into. One which I find particularly hard to understand is how mixed mode
comparisons work
On Thu, 05 Feb 2009 01:47:28 +, nrix...@gmail.com (Nathan Rixham) wrote:
Clancy wrote:
I'm working on a website editor, primarily for my own use. Normally it will
be used on my
own computer, and much of what I wish to achieve could arguably be better
done in either C
or JavaScript
I'm working on a website editor, primarily for my own use. Normally it will be
used on my
own computer, and much of what I wish to achieve could arguably be better done
in either C
or JavaScript, but both of these have a similar programming syntax to PHP, but
with subtle
differences, and I
On Wed, 28 Jan 2009 00:50:18 +, nrix...@gmail.com (Nathan Rixham) wrote:
Clancy wrote:
Also what the relative virtues of defining the same set of fields for every
contact, as
against either defining only the fields which actually hold values, as in
the following
examples
PHP arrays permit extremely concise programming; for example if I have all my
contacts in
an array $contacts, I can write:
$my_phone_no = $contacts['clancy']['phone'];
However it is clear that there must be a lot going on behind the scenes to
achieve this
simple result, as it requires some
On Fri, 16 Jan 2009 00:51:58 -0500, pa...@quillandmouse.com (Paul M Foster)
wrote:
On Fri, Jan 16, 2009 at 11:57:24AM +1100, Clancy wrote:
.
The only explanation I can see is that someone has somehow managed to
cache or mirror the
version 1 logic, and is still
For some time I have had feedback pages on several of my websites based on the
example
given by David Powers in chapter 6 of PHP for Dreamweaver 8. These worked
fine for some
years, but some months ago someone started stuffing pornographic advertisements
into them.
A few weeks ago I got fed up
On Mon, 22 Dec 2008 22:40:58 -0800, larstor...@gmail.com (Lars Torben Wilson)
wrote:
Well, in all fairness, it *is* faster--but you'll only notice the
difference in extremely tight and long-running loops (try it ;) ). As
long as you know why you're using it and what the side effects are, it
On Tue, 23 Dec 2008 10:25:13 -0500, tedd.sperl...@gmail.com (tedd) wrote:
At 9:10 AM +1100 12/23/08, Clancy wrote:
Schlossnagle (in Advanced PHP Programming) advises:
$i = 0; while ($i $j)
{
++$i;
}
rather than:
$i = 0; while ($i $j
On Mon, 22 Dec 2008 10:20:09 +1100, dmag...@gmail.com (Chris) wrote:
I'd call this a micro-optimization. If changing this causes that much of
a difference in your script, wow - you're way ahead of the rest of us.
Schlossnagle (in Advanced PHP Programming) advises:
$i = 0; while ($i
On Fri, 05 Dec 2008 20:24:07 +, [EMAIL PROTECTED] (Ashley
Sheridan) wrote:
On Fri, 2008-12-05 at 15:16 -0500, Bastien Koert wrote:
On Fri, Dec 5, 2008 at 3:18 PM, Ashley Sheridan [EMAIL PROTECTED]wrote:
On Fri, 2008-12-05 at 12:08 -0800, Yeti wrote:
Java Script should always be an
On Wed, 03 Dec 2008 08:15:14 +, [EMAIL PROTECTED] (Ashley
Sheridan) wrote:
Go with what Yeti said. The browser will automatically pick the right
stylesheet when the user presses the print button or you issue a
window.print() from Javascript. Whatever you do, don't have a separate
page for
Is it possible to access the 'media' attribute from php, so (for
example) you can tailor a page for printing?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. It would have been far simpler if I could have done
it in php.
Thank you for your help.
On Wed, 3 Dec 2008 14:34:20 +1300, [EMAIL PROTECTED] (German Geek)
wrote:
PHP is a server side language...
On Wed, Dec 3, 2008 at 2:16 PM, Clancy [EMAIL PROTECTED] wrote:
Is it possible to access the 'media
On Wed, 3 Dec 2008 15:28:17 +1300, [EMAIL PROTECTED] (German Geek)
wrote:
You can do things on the client side with Javascript ;) Sorry, what was the
result you are after?
I have enough trouble getting my rather ancient brain around PHP, and
was hoping that I could avoid getting involved with
69 matches
Mail list logo