ITC 280 – the new includes

PHP allows a web designer to create a web page using “included files.” This technique is used by programmers for other purposes. In web design what the designer basically does, using a php script, is tell the server to assemble a web page out of pieces he has created previously. Those pieces can also have php scripts in them!

I am working with 3 different versions of a single web page using these includes. And I am working with them both at home and at school. So I have to get the three systems working the same way in both places. This Saturday I spent about 7 hours doing this.

Relative paths becomes a big issue when you have so many different files. It is a good idea to make sure all your paths work before you spend a lot of time writing code for a page. The most important paths are saved as constants in a configuration include. Without that include file, nothing else in the system will work!

What happened is that bacause of differences in how the school server and my home server are configured, they treat some relative paths in different ways. I spent a lot of my time getting stuff to work on the school server that was working fine at home. Hopefully I undestand it well enough now that I will not make the same mistakes again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.