PDA

View Full Version : PHP Includes (dont know if this belongs here )


sushipixel
11-04-2006, 01:32 AM
Well i really dont know if this really fits here , since its not much of php . Well i decided to use php includes to make editing easy (i do it frequently ) . Well i uploaded my files to a server , did everything correctly . But i chnage my host and so i sift my files throught FTP to the other server . I type in the url , but id dosent work .

This one is the one that works , http://free.hostultra.com/~animearchives/index2.php

Then this one dosent work , i just shifted my files , no editing http://animearchives.atspace.com/index2.php

Cant figure it out , i might have just mispelled something , missing something etc . But i cant find it . If anyone has a suggestion to another methode to achive this , please suggest it . :)

althalus
11-04-2006, 02:53 AM
By the looks of it, your new host don't support php, as the php ain't parsed. :|

sushipixel
11-04-2006, 01:06 PM
But thats the wierdest thing . On the hostultra one it didnt work , until i overrided the original with the new design . Ive never had this problem .

erisco
11-04-2006, 10:13 PM
sushipixel, it atspace doesn't support PHP, there are no further if's and's or but's about why it will not work on atpsace. The issues on hostultra are utterly and entirely separate.

Sedativechunk
11-09-2006, 01:55 AM
Your new hosting service doesn't support php. Had similar problem when working on a gaming site that is hosted by tripod, which doesn't support php.
I have an alternate solution for you. If you want to make things easier editing, try using .shtml instead of .php. These are called "virtual includes." For example, lets say you have links on the bottom of your page. You change them occacionally and they are going to be over multiple pages. Convert all your pages to .shtml at the end instead of .php Now lets say your index is now .shtml. Create a new file called links.shtml. Add your links here, your styling, or whatever you prefer. Now go in you index and use the following code:

<!--#include virtual="links.shtml" -->

Also, you make make your pages .asp instead of .shtml if you preffer. This is a great alternative when you are not allowed to use php. However, I am not gauranteeing this to work either. This kind of work is called "SSI includes." If your server or hosting service or whatever does not support it or the use of the virtual include this will not work. But give it a try, chances are it will work because your site supports html files. Good luck and I hope you find this helpful.