php-windows Digest 31 Mar 2004 21:02:15 -0000 Issue 2189
Topics (messages 23325 through 23330):
WARNING! Virus
23325 by: Firman Wandayandi
Including files in php
23326 by: Jim MacDiarmid
23327 by: trystano.aol.com
23330 by: Jason Barnett
MySQL Limit Question
23328 by: Tony Devlin
23329 by: Justin Patrin
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 ---
Be carefull guys, maybe email attacment contain a virus, NAV 2003 catch a
virus [EMAIL PROTECTED] I don't know from which list, php-general,
php-windows, pear-general, pear-dev or pear-cvs.
Firman
--- End Message ---
--- Begin Message ---
I seem to be having trouble with including files into my pages. I like
to structure my site into folders so that I can keep the root folder
relatively clean and only necessary files go in there. For example:
\DocRoot\
\folder1\
\folder2\
\folder3\
-- etc --
I've noticed that in order to include a files into pages or call other
files, I have to specify the path of the folder in my php.ini include
directive. I've tried to specify the path of the file in the include()
or require() statement, such as
include("..\folder1\includefile.php");
Or just include("\folder1\includefile.php");
but that doesn't seem to help. Is there an easier way to this?
Thanks a bunch,
Jim
--- End Message ---
--- Begin Message ---
try not to use the '\' as this is an escape character. Try using '/' and see what
happends.
Tryst
--- End Message ---
--- Begin Message ---
Jim Macdiarmid wrote:
I seem to be having trouble with including files into my pages. I like
to structure my site into folders so that I can keep the root folder
relatively clean and only necessary files go in there. For example:
\DocRoot\
\folder1\
\folder2\
\folder3\
-- etc --
include("..\folder1\includefile.php");
Or just include("\folder1\includefile.php");
but that doesn't seem to help. Is there an easier way to this?
Thanks a bunch,
Jim
Check out your php.ini, the directive called include_path. But realize
that if you do it this way and plan to take your code to another machine
then you will have to change this ini directive on the new machine.
One other option is to create a common.php file in your DocRoot that
gets included in every file and sets the docroot. See
http://www.php.net/manual/en/function.dirname.php
--- End Message ---
--- Begin Message ---
How can I setup a query to select from a database ONLY the last 5 inserted
rows. OR atleast the last 5 starting from this date back, but only select
the last 5 in order.
If anyone has any suggestions I'd appreciate them.
Thanks,
Tony
--- End Message ---
--- Begin Message ---
Tony Devlin wrote:
How can I setup a query to select from a database ONLY the last 5 inserted
rows. OR atleast the last 5 starting from this date back, but only select
the last 5 in order.
If anyone has any suggestions I'd appreciate them.
Thanks,
Tony
I would set up a timestamp column in the table then select ordered by
the timstamp descending and limit to 5.
--
paperCrane <Justin Patrin>
--- End Message ---