NYCPHP Meetup

[nycphp-talk] php include file question IT WORKS

Deidra McIntyre lists at redibishosting.com
Tue Apr 1 10:42:56 EST 2003


Thank you!!

What I did was change the includes to Dan's format:
<? include("./copyright.html") ?>

And change all the files (i.e. formerly index.html, aboutus.html) to .php
as per the suggestion from Louie (Translated by Tim).

Thanks!!
Deidra

> Just to clarify, and I think this is what Louie was talking about...
>
> Are you using the php include call on an html page?  Or do you have a
> page (whatever.php) from which you are calling .html files as includes?
> If this is the case, and your main page is a .html page, then you cannot
> use <?php include () ?> on it unless your server is specifically set up
> to parse .html files as if they were php.  Dig?  So when he's talking
> about changing .html to .php, he's talking about the main page, not the
> pages you are calling from that page.  If this is your situation, you
> need to tell your web admin to set up the webserver to parse .html files
> as if they were .php.
>
> Hope I'm getting the problem right.  It's all a bit confusing.
>
> Luck,
> Tim
>
> On 3/31/03 5:38 PM, "Deidra McIntyre" <lists at redibishosting.com> wrote:
>
>> I passed along most of the emails to the syst. admin (technician) who
>> installed the PHP on the servers. He's not in till tomorrow.
>>
>> I will try Dan's suggestion later tonight. Because, that may resolve
>> the entire issue.
>>
>> I don't understand the question below. Too much short-hand. To
>> reclarify, I have basic html pages for the site. Let's take one of
>> them, index.html. Within index.html, I used several include files to
>> call standard aspects of the site (i.e. header, certain repetitive
>> images, and copyright). None of these include files contain php. They
>> are just html (i.e. <p><img src="sameimageeverywhere.gif"></p>).
>>
>> Simply changing the html or include files to .php does not resolve the
>> issue.
>>
>> Does that clarify it for you?
>>
>> Thanks,
>> Deidra
>>
>> --> Deidra
>>
>> greetings folks,
>>>
>>> you all list  all the problems the include() function can cause, i
>>> dont think she realy describe her problem,
>>> i just think she put the <? include("copyright.html"); ?>
>>>  within  .html\\.htm extension.
>>> she mention a technician so did the conf the php.ini
>>> most off them leave the error all ,
>>> and she didnt say nothin' about error
>>> and she say :
>>>
>>>> Within the HTML documents that call the include files,
>>>
>>> within the html doc??????
>>> she call the include() from html doc. ??
>>> all she need than is to cahnge is the file  to "whatever.php"  and
>>> face the scond problem :P
>>>
>>> deidra : write the file name  ?
>>>             and just C/P the code here,
>>>
>>> best regards,
>>> louie.
>>>
>>> ----- Original Message -----
>>> From: "Deidra McIntyre" <lists at redibishosting.com>
>>> To: "NYPHP Talk" <talk at nyphp.org>
>>> Sent: Monday, March 31, 2003 9:52 AM
>>> Subject: [nycphp-talk] php include file question
>>>
>>>
>>>> List,
>>>>
>>>> I'm breaking up my html site into includes (header, copyright,
>>>> etc.). Within the HTML documents that call the include files, I have
>>>> the appropriate php tags (i.e. <? include("copyright.html"); ?> .
>>>> All of the includes (i.e. copyright.html) are sitting in the same
>>>> directory as my html pages (i.e. index.html). PHP is installed.
>>>>
>>>> So, why, no matter what I do, don't the include files parse into my
>>>> document? I have tried to changed the include extensions from .html
>>>> to php to .inc. None parse. Most of my includes contain basic HTML
>>>> (no php) like <p>Copyright &copy; 2003. All Rights Reserved.</p>.
>>>>
>>>> Am I doing something wrong? Or does my technician need to change
>>>> something in the server configuration (if so what)?
>>>>
>>>> Thanks,
>>>> Deidra
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> _________________
> Tim Arnold
> tim at fiercefamily.com
>
>
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---






More information about the talk mailing list