2009/2/17 PJ af.gour...@videotron.ca:
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users save the pages to disk.
That would be fine if the
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users save the
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
This generates a Fatal error: Cal to undefined function dirname()
I must be really dense...
What I don't understand in the above is this - dirname refers to what
directory? -- the directory of the file that is including?
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
This generates a Fatal error: Cal to undefined function dirname()
The dirname function is present in both PHP 4 and 5 and does not rely
on any external libraries. Are you sure you're
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
--
Thodoris a écrit :
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root), like:
/graphics/my_portrait.gif
Or you
PJ wrote:
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users
Stuart wrote:
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
This generates a Fatal error: Cal to undefined function dirname()
The dirname function is present in both PHP 4 and 5 and does not rely
on
On Wed, Feb 18, 2009 at 12:05 PM, PJ af.gour...@videotron.ca wrote:
Stuart wrote:
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
This generates a Fatal error: Cal to undefined function dirname()
The dirname
---
Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get
a Free CD of Ubuntu mailed to your door without any cost. Visit :
www.ubuntu.com
--
On Wed, Feb 18, 2009 at 12:05:21PM -0500, PJ wrote:
Stuart wrote:
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
snip
What confused me here is that often, in examples, there are all sorts of
references to files and there
Bastien Koert wrote:
On Wed, Feb 18, 2009 at 12:05 PM, PJ af.gour...@videotron.ca wrote:
Stuart wrote:
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
This generates a Fatal error: Cal to undefined function dirname()
The
Paul M Foster wrote:
On Wed, Feb 18, 2009 at 12:05:21PM -0500, PJ wrote:
Stuart wrote:
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
snip
What confused me here is that often, in examples, there are all sorts of
references to
Johnny wrote:
Hi Thodoris,
In my opinion, the best use is to include your file with relative urls,
like :
img src=/path/to/img.jpg /
I believe that it best.
Including the hostname use to cause a dns lookup in some browsers which
made it slower but I don't believe that is the case
2009/2/18 PJ af.gour...@videotron.ca:
Paul M Foster wrote:
On Wed, Feb 18, 2009 at 12:05:21PM -0500, PJ wrote:
Stuart wrote:
2009/2/18 PJ af.gour...@videotron.ca:
Stuart wrote:
?php include dirname(__FILE__)./../header.php; ?
snip
What confused me here is that often, in examples,
2009/2/17 Paul M Foster pa...@quillandmouse.com:
On Mon, Feb 16, 2009 at 08:49:06PM +, Stuart wrote:
2009/2/16 Paul M Foster pa...@quillandmouse.com:
snip
Agreed. But here's the real reason, in my case. We develop the pages on
an internal server, which has the URL
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root), like:
/graphics/my_portrait.gif
Or you can include the
On Tue, Feb 17, 2009 at 11:22:32AM +, Stuart wrote:
2009/2/17 Paul M Foster pa...@quillandmouse.com:
snip
Maintaining identical development, staging and live environments is
one of the key components of reliable, repeatable and streamlined
development, testing and deployment, but if
Virgilio Quilario wrote:
The difference is in manageability.
Copying the scripts to another domain and you're using full url for
your src and href when referring to local images or css or pages, will
give you trouble and you must change all of them to your new domain.
which takes about 3
But that's where mistakes are often made. It also means you need to
maintain a different live version to that of your development version.
If find it much easier to have relative paths and then there's no
build process needed to go live, I can just upload it.
2009/2/17 Michael A. Peters
Lewis Wright wrote:
But that's where mistakes are often made. It also means you need to
maintain a different live version to that of your development version.
If find it much easier to have relative paths and then there's no
build process needed to go live, I can just upload it.
2009/2/17
I know it's been said before, but beware of relying on this value just
for the sole purpose of deciding where things are located, as without a
bit of error checking on it, it can be used for injection attacks and
what-not, although, sadly, I forget the exact post recently that had the
link that
for that matter, you could use variables to specify the relative path to make
it absolute within each of the production and dev environments.
Another possible solution I can think is building configuration files
that could include the paths and parse them to find the path every time
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users save the pages to disk.
That would be fine if the pages weren't being crafted in Dreamweaver,
where inserting links like that is a pain.
For that
PJ wrote:
I hope I'm not out of place here, but I have a problem that seems to be
related.
I am using some include statements for page headers with the pages in
various directories on the site. The problem is this... if I put
relative statements in the page (header.php) like
Alternatively, $_SERVER['PHP_SELF']) could be switch()ed for known
values, and $path be set accordingly with hardcoded values.
Didn't notice this thread passing from the list. I will look into it.
But sometimes you need to detect where something is located and that's the
point of the whole
Easy to solve.
ini_set(include_path,
/srv/domain/phpinclude:/srv/domain/record_include:/srv/domain/process_include);
Then just call it without path - IE
include('foo.inc');
php will first look for foo.inc in /srv/domain/phpinclude, then in
/srv/domain/record_include, etc.
make
2009/2/17 PJ af.gour...@videotron.ca:
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users save the pages to disk.
That would be fine if the pages weren't being crafted in Dreamweaver,
where inserting
Michael A. Peters wrote:
PJ wrote:
I hope I'm not out of place here, but I have a problem that seems to be
related.
I am using some include statements for page headers with the pages in
various directories on the site. The problem is this... if I put
relative statements in the page
PJ wrote:
Michael A. Peters wrote:
PJ wrote:
I hope I'm not out of place here, but I have a problem that seems to be
related.
I am using some include statements for page headers with the pages in
various directories on the site. The problem is this... if I put
relative statements in the page
Michael A. Peters wrote:
PJ wrote:
Michael A. Peters wrote:
PJ wrote:
I hope I'm not out of place here, but I have a problem that seems
to be
related.
I am using some include statements for page headers with the pages in
various directories on the site. The problem is this... if I put
Stuart wrote:
2009/2/17 PJ af.gour...@videotron.ca:
Dotan Cohen wrote:
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users save the pages to disk.
That would be fine if the pages weren't being
PJ wrote:
my server is FreeBSD 7.0
My situation is this: I am evolving www.ptahhotep.com from pure HTML to
php-mysql-css (not an easy task for a newbie :-) )
The challenge is to set up the web site on my local server and then move
it all to my web host.
Unless I am mistaken, I am pretty sure I
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root), like:
/graphics/my_portrait.gif
Or you can include the full URL,
Paul M Foster wrote:
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root), like:
/graphics/my_portrait.gif
Or
My casual observation seems to indicate that the former will load faster
than the latter. But has anyone done any benchmarking on it?
Did you clear the cache between tests? That could explain the speed difference.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
Should be the same as the dns request is cached and a request needs to be
made anyway.
You could argue that relative URLs are less secure, but i cannot really see
why. Well i guess someone can easier steal your source but it doesnt get
much harder with absolute URLs.
Tim-Hinnerk Heuer
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root), like:
/graphics/my_portrait.gif
Or you can include the full
On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote:
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root),
Agreed. But here's the real reason, in my case. We develop the pages on
an internal server, which has the URL http://pokey/mysite.com. When we
move the pages to the live server at mysite.com, all the URLs would have
to be rewritten. Ugh.
Paul
So put it all in one place:
?php
include
On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote:
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the relative path to the file
(relative to the doc root),
On Mon, Feb 16, 2009 at 08:09:51PM +0200, Dotan Cohen wrote:
Agreed. But here's the real reason, in my case. We develop the pages on
an internal server, which has the URL http://pokey/mysite.com. When we
move the pages to the live server at mysite.com, all the URLs would have
to be
So put it all in one place:
?php
include path.inc;
printa href=\$path/dir/file.php\;
?
Full URLs don't break when users save the pages to disk.
That would be fine if the pages weren't being crafted in Dreamweaver,
where inserting links like that is a pain.
For that you'd have to ask
On Mon, 2009-02-16 at 20:19 +0200, Thodoris wrote:
On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote:
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include
I know it's been said before, but beware of relying on this value just
for the sole purpose of deciding where things are located, as without a
bit of error checking on it, it can be used for injection attacks and
what-not, although, sadly, I forget the exact post recently that had the
link
Tim-Hinnerk Heuer
http://www.ihostnz.com
Mike Ditka - If God had wanted man to play soccer, he wouldn't have given
us arms.
2009/2/17 Paul M Foster pa...@quillandmouse.com
On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote:
Here's a question related to my last post. When specifying
2009/2/16 Paul M Foster pa...@quillandmouse.com:
On Mon, Feb 16, 2009 at 07:39:29PM +0200, Thodoris wrote:
Here's a question related to my last post. When specifying a link in a
HTML file (like to the css or an image file), there are two ways of
doing it. One is to simply include the
On Mon, Feb 16, 2009 at 08:49:06PM +, Stuart wrote:
2009/2/16 Paul M Foster pa...@quillandmouse.com:
snip
Agreed. But here's the real reason, in my case. We develop the pages on
an internal server, which has the URL http://pokey/mysite.com. When we
move the pages to the live server
49 matches
Mail list logo