Reply to Re: includes question

Your name:

Reply:


Posted by Jerry Stuckle on 09/26/05 14:54

windandwaves wrote:
> Jerry Stuckle wrote:
>
>
>>You can, but you will get the output from the code, not the code
>>itself.
>
>
> I just tried include_once("http://www.someotherurl.com/HTML_snippets.php");
> but that did not seem to work.
>
> I am also wondering if the file contains functions then it really needs to
> write the underlying file and not just return the output from the file. How
> exactly does this work?
>
> TIA
>
> Nicolaas
>
>

Nicolaas,

When you access a file with just it's filename (and path), you're
accessing the file directly through the local file system. In this case
you fetch the contents of the file.

However, when you access a file using 'http://xxx', you are accessing
the file through a web server, just as if you were accessing it via a
browser. The web server will parse the file, and if it includes PHP (or
perl, java or other scripting language), the web server will execute the
code. You will get the output of the web page, just as if you accessed
it via your browser.

This access can be via include, include_once, require, require_once,
fopen, etc. The key here is the use of http://... which indicates the
file should come through the web server. Using just the file name (and
path) in PHP code indicates the file comes directly from the file
system, and is not parsed by the web server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация