FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » can't get includes to load
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: can't get includes to load [message #180931 is a reply to message #180921] Tue, 26 March 2013 21:50 Go to previous messageGo to previous message
Cal Dershowitz is currently offline  Cal Dershowitz
Messages: 36
Registered: February 2013
Karma:
Member
On 03/26/2013 01:36 AM, J.O. Aho wrote:

[re-ordered, for thematic reasons]

>> Right now, index.html loads but none of the other and it exits without
>> complaint. This is only running on my linux machine here at the local
>> root directory, which is indicated by the pwd command.
>
> You have an index.html, when apache looks at the file it will think of
> it as plain html and just output it as it is, you can easily verify this
> by looking at the source code in the browser (right click on the page
> and select "View Page Source"), you will see those <?php ?> tags.
>
> The fix is to do a:
>
> mv /home/sites/migrate/index.html /home/sites/migrate/index.php
>
> now apache will use the php engine to parse the file and php engine will
> replace the <?php ?> with the content in the files.
>
> Sure there are some people who would say to add html to the AddHandler
> for php, but please do not listen to them, you will make your apache/php
> to work more and you will not be compliant with most hosting companies,
> so when you upload your things to your web hotel you want it to work.
>

Thx JO, that simple thing was it. I now have my first php webpage out
on my domain space as opposed to just the localhost.

http://merrillpjensen.com/index.php#

Why did the server add a hash on the end of it?

Why does the sidebar not end up on the side like it does for the local
host and the same browser?

I uploaded these files using Filezilla. I can see that if this is the
way I'm going to do this, then whatever ends up on my server will be
riddled with mistakes and differing versions of things.

> From the file layout, it looks correct, we do recommend you use
> $_SERVER['DOCUMENT_ROOT'] for includes eg:
>
> include $_SERVER['DOCUMENT_ROOT'].'includes/sidebar.php';
>
> this will make it easier the day when you put things in sub folders,
> like /home/sites/migrate/articles and you still want to include those
> from /home/sites/migrate/include.

And again thx,but I made this change and got a parse error from it. I
can't even show it, because I had to go in and overwrite it so as to
have anything to show at all, which is important so that others can see
what I'm trying to do.

I have simple questions at this point: how do you try something new on
your server without stomping all over the last thing that worked?
--
Cal
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mysql dynamic binding and pass-by-ref deprecated
Next Topic: Java conferences in India...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 03:41:54 GMT 2024

Total time taken to generate the page: 0.04283 seconds