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 #180932 is a reply to message #180931] Wed, 27 March 2013 02:14 Go to previous messageGo to previous message
Jim Higgins is currently offline  Jim Higgins
Messages: 20
Registered: November 2010
Karma:
Junior Member
On Tue, 26 Mar 2013 14:50:20 -0700, in
<3bednVqnL5qAhc_MnZ2dnUVZ_q6dnZ2d(at)supernews(dot)com>, Cal Dershowitz
<cal(at)example(dot)invalid> wrote:

> 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?


It didn't, unless you clicked one of the links in the menu on that
page. Those dummy links consist of nothing but "#".


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


Did you also upload the CSS file that controls the layout for this
page?


> 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.


Why? If you have a page on your server and the same page on your
local machine, just copy/backup that page on the local machine, make
your updates to the original, view them, then upload the new page to
the server. When you're satisfied all is well, delete the backup.

And if you maintain the same directory structure on your local machine
as on your server, the pages should work just fine in both places.

What you can't do is (for example) have your CSS files in some
directory on your local machine that has a different name than on your
server. If you do that the reference to the CSS file that works on
the local machine won't find the CSS file on the server.


>> 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.


If you have a parse error you probably have a typo. See that little
dot after ['DOCUMENT_ROOT']? Did you leave it out? Inspect the above
and what you have character by character.


> 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?


Let's say the page you want to work on is named ORIGINAL.PHP. You
make a copy of that file and you call it something like
ORIGINAL.PHP.BAK. Then you work on ORIGINAL.PHP. If you need more
copies og that original, you can append a date or a letter or whatever
after BAK to differentiate them.
[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: Thu Nov 28 03:36:33 GMT 2024

Total time taken to generate the page: 0.06054 seconds