crashpolo Posted November 28, 2007 Share Posted November 28, 2007 Hi Probably really simple but for the life of me cant remember how to fix this In breif IIS6 Runing Php ... need to include files from the local host which is fine or a remote unix box Code is <?php include 'test2.php';?> <?php include '\\server1\tmp\test3.htm';?> php ini file is ; Windows: "\path1;\path2" include_path = ".;c:\php\includes" What have I missed its proper bugging me is this now the error I get is Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.;C:\php5\pear') in C:\Inetpub\wwwroot\home_page\index5.php on line 319 Oh and \\server1\tmp\test3.htm will open up in any browser and display ! Quote Link to comment Share on other sites More sharing options...
crashpolo Posted November 28, 2007 Author Share Posted November 28, 2007 So far not one reply lol !!! Im guessing its the php.ini file I need to change where the include statement points to or add to the list where it does point to ... is this correct ? ".;c:\php\includes:\\server1\tmp" Quote Link to comment Share on other sites More sharing options...
crashpolo Posted November 28, 2007 Author Share Posted November 28, 2007 somebody surely knows how to include a file from another server or cant it be done ? Help ? Quote Link to comment Share on other sites More sharing options...
crashpolo Posted November 28, 2007 Author Share Posted November 28, 2007 include_path=".;c:\php\includes;server1\tmp\;server2\tmp" would this work ? Quote Link to comment Share on other sites More sharing options...
Wes1890 Posted November 28, 2007 Share Posted November 28, 2007 include_path=".;c:\php\includes;server1\tmp\;server2\tmp" would this work ? why dont you just try it and see? Quote Link to comment Share on other sites More sharing options...
crashpolo Posted November 28, 2007 Author Share Posted November 28, 2007 because im not at work now ! so was just curious to see if this would work when i get in tomorrow ..dont wanna be barking up the wrong tree so to speak ! Quote Link to comment Share on other sites More sharing options...
crashpolo Posted November 28, 2007 Author Share Posted November 28, 2007 hi can anyone let me know if this include is right ? if not ill keep scratching me head lol and try tomorrow Quote Link to comment Share on other sites More sharing options...
trq Posted November 28, 2007 Share Posted November 28, 2007 If you want to include a file from another server you need to use a url. eg; <?php include 'http://server.com/file.php'; ?> You will also need url wrappers enabled in your php.ini file. Quote Link to comment Share on other sites More sharing options...
crashpolo Posted November 29, 2007 Author Share Posted November 29, 2007 Tried that and this is the error I get but the wrappers are enabled ?! Ive never used wrappers sorry ! failed to open stream: no suitable wrapper could be found allow_url_include = on Quote Link to comment Share on other sites More sharing options...
trq Posted November 29, 2007 Share Posted November 29, 2007 You'll also need to enable allow_url_fopen. Quote Link to comment Share on other sites More sharing options...
aschk Posted November 29, 2007 Share Posted November 29, 2007 Where is \\server1\tmp ? Is it a networked filesystem? If so then apply a drive letter to it on your Windows machine and use that ( Z:/tmp ). Also by including a file over URL stream you're going to get the PHP output, not the PHP itself... so your fopen is not going to work, unless of course all you want is the html/result it gives you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.