View Full Version : includes in php
Eclipse
March 20th, 2001, 06:16
1. Why deson't SSI work with php?
2. What's wrong with: include('/admin/test.php');
[Edited by Eclipse on 03-20-2001 at 07:44 AM]
Niaad
March 20th, 2001, 21:45
Use quotes instead, I think.
Eclipse
March 21st, 2001, 02:37
Thank you for the thinking! :-)
Unfortunatley it didn't help me this time. I'm running win-98 + pws + mysql + php.
As far as I can tell, it's impossible to include files with that setup!
I find it a bit strange that php doesn't support server-side includes, ssi.
Woofcat
March 21st, 2001, 08:51
Originally posted by Eclipse
[B]1. Why deson't SSI work with php?
2. What's wrong with: include('/admin/test.php');
Looks like you're trying to include http://www.whatever.com/admin/test.php but you're using an absolute path so PHP is looking for C:\admin\test.php...
Niaad
March 21st, 2001, 16:05
PHP doesn't support server side includes because you need a .shtml extension to do it. That's why there is the include() function, only it doesn't work for you...which sucks =(.
The include function should work fine with absolute paths, I remember reading a tutorial that said that's how you do it. I just don't think it is going to work for him. You can try the full URL if you want...but, I doubt it will make any difference. I think include() just isn't going to work.
Eclipse
March 26th, 2001, 02:20
I've learned that the win 32 version of php doesn't support the standard include() funktion.
I finally manage to solve it this way:
<?
require("c:\Customers\WEB\Olai\www\admin\menu.php");
?>
Then I can just ask either what OS the server runs or what IP the server uses to have the same script run on both windows and unix.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.