Frankly, while that modulo looks like something worthy of learning,
for my immediate time critical need I went with a quicker method,
which is working. The complete script is below. It simply counts
cells and resets the row when a number is exceeded.
?php
# The next several lines declare an
Now I have a situation. I need to take the code from my former home
page and modify it to lay out a table (let's say 5 cells wide) and
as many rows deep to contain all the items. Each item is the name of
the directory, under which is an icon image from that directory,
under which is a
On 15 February 2011 00:53, Kirk Bailey kbai...@howlermonkey.net wrote:
Now I have a situation. I need to take the code from my former home page and
modify it to lay out a table (let's say 5 cells wide) and as many rows deep
to contain all the items. Each item is the name of the directory, under
well, this ends the row after every cell. I am trying to get a row
of 5 cells across, then end it and start a new row. If the routines
stops before the end of the count of 5 due to lack of further
directories, closing out the table following the loops will onclude
a /tr tag.
On 2/14/2011
On 2/14/2011 4:53 PM, Kirk Bailey wrote:
Now I have a situation. I need to take the code from my former home page and
modify it to lay out a table (let's say 5 cells wide) and as many rows deep to
contain all the items. Each item is the name of the directory, under which is
an
icon image
Very nice; I am leaning in the direction of doing it this way. Thank
you!
:-)
On 2/14/2011 9:24 PM, Jim Lucas wrote:
On 2/14/2011 4:53 PM, Kirk Bailey wrote:
Now I have a situation. I need to take the code from my former home page and
modify it to lay out a table (let's say 5 cells wide)
Kirk Bailey wrote:
Ok, so what is echo, and how is it different from print.
The code in code quest used echo. I have a copy of learning php 5.0 from
O'Reilly, and noplace does it mention echo. Why? What's the difference?
IS there a difference? Is there an advantage to either? Please clarify
Groovy; they appear to be identical in all but name. IDENTICAL. Or am I
missing a subtle definition difference?
David Robley wrote:
Kirk Bailey wrote:
Ok, so what is echo, and how is it different from print.
The code in code quest used echo. I have a copy of learning php 5.0 from
They are almost identical.
Echo supports multiple parameters like echo $a, $b;
print is 20% slower than echo (by some tests).
echo is shorter than print so it's easy to write.
In fact it's all a matter of taste. The same reason we user die instead of
exit.
Alex
On Sun, Dec 12, 2010 at 6:23 PM,
, Dec 12, 2010 18:56
Subject: [PHP] code quest - ECHO?!?
To: Kirk Bailey kbai...@howlermonkey.net
Cc: php-general@lists.php.net
They are almost identical.
Echo supports multiple parameters like echo $a, $b;
print is 20% slower than echo (by some tests).
echo is shorter than print so it's easy
Ok, so what is echo, and how is it different from print.
The code in code quest used echo. I have a copy of learning php 5.0 from
O'Reilly, and noplace does it mention echo. Why? What's the difference?
IS there a difference? Is there an advantage to either? Please clarify
for this newbie.
OK, now here's a giggle; I like ssi includes. If I put the script in as
an ssi include, will it still work? The functionality would also be
useful on a page besides the default landing page, such as a
404error.html page, or a thank you page.
--
end
Very Truly yours,
- Kirk
A good point, but in this application there WILL be AT LEAST 1
legitimate directory at all times, or else the script would not be used,
so this ought not be a problem.
My problem is that I understand the basic functions to implement, but
have not yet aquired sufficient command of php to
Now Now, fight nice. We don need no stinkin' @$^*$^(! woids here. :-P
Steve Staples wrote:
On Thu, 2010-12-02 at 10:07 -0500, Daniel P. Brown wrote:
On Wed, Dec 1, 2010 at 23:13, Kirk Bailey kbai...@howlermonkey.net wrote:
[snip!]
Can this be improved to exclude anything with a '.'
my current code is as follows:
*ul
?php # The next several lines declare an array of directories which
are NOT to be listed!
$excludes[] = 'images';
$excludes[] = 'cgi-bin';
$excludes[] = 'vti_cnf';
$excludes[] = 'private';
$excludes[] = 'thumbnail';
$ls =
From: Kirk Bailey kbai...@howlermonkey.net
OK, now here's a giggle; I like ssi includes. If I put the script
in as an ssi include, will it still work?
If you're using Apache, and you do
!--#include virtual=something.php --
...the PHP in something.php will execute and produce output, but
Ok, let's kick this around.
iterating an array(?; 1 dimensional listing of things) in php, I am
creating a list of direcoties. I want to open and read in a file in each
directory with a standard name, which contains a 1 line description of
the directory and it's purpose.
Now, here's the
The hound barks, but does not yet properly hunt, and we need to bring
home the bacon.
OK, here is the current code:
?php # The next several lines declare an array of directories which
are NOT to be listed!
$excludes[] = 'images';
$excludes[] = 'cgi-bin';
$excludes[] = 'vti_cnf';
On Dec 4, 2010, at 2:15 PM, Kirk Bailey wrote:
The hound barks, but does not yet properly hunt, and we need to
bring home the bacon.
OK, here is the current code:
?php # The next several lines declare an array of directories which
are NOT to be listed!
$excludes[] = 'images';
the code is now:
?php # The next several lines declare an array of directories which
are NOT to be listed!
$excludes[] = 'images';
$excludes[] = 'cgi-bin';
$excludes[] = 'vti_cnf';
$excludes[] = 'private';
$excludes[] = 'thumbnail';
$ls = scandir(dirname(__FILE__));
On 4 December 2010 20:58, Kirk Bailey kbai...@howlermonkey.net wrote:
the code is now:
?php # The next several lines declare an array of directories which
are NOT to be listed!
$excludes[] = 'images';
$excludes[] = 'cgi-bin';
$excludes[] = 'vti_cnf';
$excludes[] = 'private';
On Sat, Dec 4, 2010 at 15:58, Kirk Bailey kbai...@howlermonkey.net wrote:
And it works!
BUT!
Where is the 1 coming from?!?
No need to see the page. You're echo'ing an include. No need to
do that; including the file is enough, and that's what's working.
Adding the echo makes it
On Dec 4, 2010, at 2:58 PM, Kirk Bailey wrote:
the code is now:
?php # The next several lines declare an array of directories which
are NOT to be listed!
$excludes[] = 'images';
$excludes[] = 'cgi-bin';
$excludes[] = 'vti_cnf';
$excludes[] = 'private';
$excludes[] = 'thumbnail';
On Wed, Dec 1, 2010 at 23:13, Kirk Bailey kbai...@howlermonkey.net wrote:
[snip!]
Can this be improved to exclude anything with a '.' or a '-' in it's name?
This will exclude the smileys and cgi-bin and such. If it can be persuaded
to read a 1 line description from each subdirectory it could
On Thu, 2010-12-02 at 10:07 -0500, Daniel P. Brown wrote:
On Wed, Dec 1, 2010 at 23:13, Kirk Bailey kbai...@howlermonkey.net wrote:
[snip!]
Can this be improved to exclude anything with a '.' or a '-' in it's name?
This will exclude the smileys and cgi-bin and such. If it can be persuaded
On 11/26/2010 4:03 PM, Kirk Bailey wrote:
Hello all, my name is Kirk Bailey, and I am new to php, so please be
forbearing.
I code in python, and am trying to learn this language as our new client runs
a
web business based in it.
I need a routine that will return a list of every directory
Daniel, this is so close to bang on it's unbelivable. Only prob is my
host provided me with this $^@%^^$! dir which is named .smileys, which
holds icons for use in the control panel. It should NOT list it, nor
list the /cgi-bin, nor /images. Can it somehow exclude those 3, or maybe
a list of
OK, answered my own question; no, an ssi statement inside a php echo
statement is simply sent out as is, unparxsed. But if it is external to
the php area, it works fine, so we have to include a function in there
that will read anything I want to spew- like the 1 line contents of a
desciptor
OK, the quest thus far:
html
head
TITLEphp experimental page/TITLE
style TYPE=text/css
body { margin-left: 5%; margin-right: 5%; }
A:link, A:visited, A:active { text-decoration:none; }
A:hover { text-decoration:underline; }
/style
/head
BODY text=00 bgcolor=FF
h2 align=centerSubdirectory
On Fri, 2010-11-26 at 20:27 -0500, Bastien wrote:
On 2010-11-26, at 7:33 PM, Adam Richardson simples...@gmail.com wrote:
On Fri, Nov 26, 2010 at 7:03 PM, Kirk Bailey
kbai...@howlermonkey.netwrote:
Hello all, my name is Kirk Bailey, and I am new to php, so please be
On Sat, Nov 27, 2010 at 12:36, Daniel P. Brown
daniel.br...@parasane.net wrote:
If you want something more powerful - and often quicker - check
into SPL: specifically FilesystemIterator[1], DirectoryIterator[2],
and RecursiveDirectoryIterator[3]. A quick example to link all child
files and
Hello all, my name is Kirk Bailey, and I am new to php, so please be
forbearing. I code in python, and am trying to learn this language as
our new client runs a web business based in it.
I need a routine that will return a list of every directory immediately
under the current directory- but
On Fri, Nov 26, 2010 at 7:03 PM, Kirk Bailey kbai...@howlermonkey.netwrote:
Hello all, my name is Kirk Bailey, and I am new to php, so please be
forbearing. I code in python, and am trying to learn this language as our
new client runs a web business based in it.
I need a routine that will
On 2010-11-26, at 7:33 PM, Adam Richardson simples...@gmail.com wrote:
On Fri, Nov 26, 2010 at 7:03 PM, Kirk Bailey kbai...@howlermonkey.netwrote:
Hello all, my name is Kirk Bailey, and I am new to php, so please be
forbearing. I code in python, and am trying to learn this language as
34 matches
Mail list logo