[PHP-WIN] Include Question!
So I am really cornfused about the include function. If I use the include function to make my code readable and neat where does the included code go. For instance: if (some variable){ include(page.php); } Does the code go into the current page where the include statement is located on the page. Hope that makes sense. Matt G -- Matthew Gonzales IT Professional Specialist Enterprise Information Technology Services University of Georgia Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Phone: (706)542-9538 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Include Question!
What is it that you are trying to accomplish? Normally no if statement is needed for an include to take place unless a certain condition triggers the use of the include. Sent via BlackBerry from T-Mobile -Original Message- From: Matthew Gonzales [EMAIL PROTECTED] Date: Fri, 09 May 2008 13:49:07 To:PHP-Windows Group php-windows@lists.php.net Subject: [PHP-WIN] Include Question! So I am really cornfused about the include function. If I use the include function to make my code readable and neat where does the included code go. For instance: if (some variable){ include(page.php); } Does the code go into the current page where the include statement is located on the page. Hope that makes sense. Matt G -- Matthew Gonzales IT Professional Specialist Enterprise Information Technology Services University of Georgia Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Phone: (706)542-9538 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Include Question!
Your code would essentially be inserted in the place where your include statement is called. Let's say that your in 'page.php' you had the following code: echo I AM IN PAGE.PHP!; and then in your script you have your code: if (some variable) { include('page.php'); } This would essentially be giving you the code: if(some variable) { echo I AM IN PAGE.PHP!; } I hope that this makes sense.. and this helps! On Fri, May 9, 2008 at 1:49 PM, Matthew Gonzales [EMAIL PROTECTED] wrote: So I am really cornfused about the include function. If I use the include function to make my code readable and neat where does the included code go. For instance: if (some variable){ include(page.php); } Does the code go into the current page where the include statement is located on the page. Hope that makes sense. Matt G -- Matthew Gonzales IT Professional Specialist Enterprise Information Technology Services University of Georgia Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Phone: (706)542-9538 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Include Question!
On 9 May 2008, at 18:56, Bradley Stahl wrote: Your code would essentially be inserted in the place where your include statement is called. Let's say that your in 'page.php' you had the following code: echo I AM IN PAGE.PHP!; and then in your script you have your code: if (some variable) { include('page.php'); } This would essentially be giving you the code: if(some variable) { echo I AM IN PAGE.PHP!; } I hope that this makes sense.. and this helps! That's not quite right and I think it's important to understand exactly what PHP does here. PHP is executing a file and encounters file inclusion (include/ require(_once)). PHP will load and compile the included file. During this stage it registers declarations in the global scope, i.e. classes and functions. After that it executes the included file in the same context from which it was included, so all local vars visible inside your if block will be accessible. Once that file's done PHP returns to executing the original file from the statement after the include. Note that no code insertion takes place, it purely passes execution to the included file. It's this sequence that prevents you from defining a class across several files. Hope that makes it clearer. -Stut -- http://stut.net/ On Fri, May 9, 2008 at 1:49 PM, Matthew Gonzales [EMAIL PROTECTED] wrote: So I am really cornfused about the include function. If I use the include function to make my code readable and neat where does the included code go. For instance: if (some variable){ include(page.php); } Does the code go into the current page where the include statement is located on the page. Hope that makes sense. Matt G -- Matthew Gonzales IT Professional Specialist Enterprise Information Technology Services University of Georgia Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Phone: (706)542-9538 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include fails when ./ is in front of file name
This works: include(file.inc.php); This doesn't: include(./file.inc.php); I can't figure it out! PHPMyAdmin uses ./ so it's obviously not working. Here's my environment: Win2003 Server w/ IIS 6 PHP 5.2.5 setup as ISAPI All PHP and httpdoc directories have read, write, and execute permissions given to IIS_WPG, IIS_USER, and NETWORK SERVICE PHP.ini's include path is: include_path = .;.\includes;.\pear (I've also tried include_path = .;./includes;./pear) phpinfo() works fine. Anyone have any ideas? Thanks! Noah -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include and warning: headers already sent by ..
Should you also just that there are no blank spaces before the includes statements in the script? Because the moment there is data (or blank spaces) in a script then the headers are sent. Thanks Tryst -Original Message- From: Bill Bolte [EMAIL PROTECTED] To: php-windows@lists.php.net Sent: Fri, 8 Feb 2008 21:17 Subject: RE: [PHP-WIN] include and warning: headers already sent by .. Also make sure that one/some of the includes aren't trying to echo/print something before it should. For ex: don't echo something before trying to output header information like redirecting to another page. Bill Bolte -Original Message- From: germana [mailto:[EMAIL PROTECTED] Sent: Friday, February 08, 2008 1:51 PM To: php-windows@lists.php.net Subject: [PHP-WIN] include and warning: headers already sent by .. Hi there!!! i just want to ask something... Sometimes when i need to do several include, or require_once or both i get the messeage: Warning: cannot modify header information - header already sent by How i can solve this problem... Thanks!!! -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php AOL's new homepage has launched. Take a tour at http://info.aol.co.uk/homepage/ now.
[PHP-WIN] include and warning: headers already sent by ..
Hi there!!! i just want to ask something... Sometimes when i need to do several include, or require_once or both i get the messeage: Warning: cannot modify header information - header already sent by How i can solve this problem... Thanks!!!
RE: [PHP-WIN] include and warning: headers already sent by ..
Also make sure that one/some of the includes aren't trying to echo/print something before it should. For ex: don't echo something before trying to output header information like redirecting to another page. Bill Bolte -Original Message- From: germana [mailto:[EMAIL PROTECTED] Sent: Friday, February 08, 2008 1:51 PM To: php-windows@lists.php.net Subject: [PHP-WIN] include and warning: headers already sent by .. Hi there!!! i just want to ask something... Sometimes when i need to do several include, or require_once or both i get the messeage: Warning: cannot modify header information - header already sent by How i can solve this problem... Thanks!!! -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include and warning: headers already sent by ..
Try to remove characters (like spaces) that can be found at the end of your php scripts... example: ?php ... your script ... ? where ### are any characters (even invisible), after the closing tag. There should be nothing. HTH, let me know Piotr germana [EMAIL PROTECTED] wrote: Hi there!!! i just want to ask something... Sometimes when i need to do several include, or require_once or both i get the messeage: Warning: cannot modify header information - header already sent by How i can solve this problem... Thanks!!!
[PHP-WIN] include txt in html
From what I have read on the web I am given to understand that I can include text files in a html document by issuing the following in the html file !--#include file=Registration.txt-- This however does not work for me. My 1st thought was that I had not allowed for SSIs in my httpd.conf but my httpd.conf Options is as follows Options Indexes Includes FollowSymLinks MultiViews ExecCGI So if someone can share with me how I got this wrong I would be grateful. -- Regards, Alf Stocktonwww.stockton.co.za Life, loathe it or ignore it, you can't like it. -- Marvin, Hitchhiker's Guide to the Galaxy My email disclaimer is available at www.stockton.co.za/disclaimer.html -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include txt in html
?php include(Registration.txt) ? If you're loading PHP as a module under Apache and you have PHP in your include file which you want to be processed, you also need to make sure it's added to your list of file types that the engine processes PHP code in. In your httpd.conf file you'd specify something like: AddType application/x-httpd-php .php .txt This would process PHP code in files with both .php and .txt extensions. Cheers. Armando Alf Stockton wrote: From what I have read on the web I am given to understand that I can include text files in a html document by issuing the following in the html file !--#include file=Registration.txt-- This however does not work for me. My 1st thought was that I had not allowed for SSIs in my httpd.conf but my httpd.conf Options is as follows Options Indexes Includes FollowSymLinks MultiViews ExecCGI So if someone can share with me how I got this wrong I would be grateful. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include problem
I recently allowed one of my friends to host their site on my server, and we realized that when you click a link, it doesn't include the content into the main page. I'm not sure what would cause this, but the include code is the following: ?php if ($page == ) { include(news.php); } else { include $arp.php; } ? The function is to by default, include news.php and then when you click a link, it should include the new page's content into the content box on the website. Instead, it doesn't show anything. I thought it might have been a browser problem, but I tested it with the newest FireFox and IE. Any help would be highly appreciated. Regards, Ken Yarbrough -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include problem
I recently allowed one of my friends to host their site on my server, and we realized that when you click a link, it doesn't include the content into the main page. I'm not sure what would cause this, but the include code is the following: ?php if ($page == ) { include(news.php); } else { include $arp.php; } ? The function is to by default, include news.php and then when you click a link, it should include the new page's content into the content box on the website. Instead, it doesn't show anything. I thought it might have been a browser problem, but I tested it with the newest FireFox and IE. Any help would be highly appreciated. Regards, Ken Yarbrough -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] include statement
A real PHP newbie here. I have so far only used the include statement in my site. Each page on the server loads a common header and footer. The header contains the site menu and the footer contains a line of logos in one graphic that map. My query is: If i load the header as .HTM does it put the included file through the PHP parser. I have the includes as .PHP at present. There is nothing php in the header or footer as yet. I am looking at saving the server some cycles by doing this. Michael -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include statement
So just so I'm clear on your files... Let's say you have a file, index.php. This file has an include statement for 'header.htm'. Your question is does it matter if the header.htm is just HTML and does not contain and PHP? No it does not matter. But the URL must be pointed to the index.php PHP page to process the actual include() PHP command thus pulling in the header.htm page. Also, in the include statement the page you are including, in this case header.htm. does not have to even be named .php, .htm etc. It can be .txt. But this is not only bad design but also a security risk. Paul --- Michael Adams [EMAIL PROTECTED] wrote: A real PHP newbie here. I have so far only used the include statement in my site. Each page on the server loads a common header and footer. The header contains the site menu and the footer contains a line of logos in one graphic that map. My query is: If i load the header as .HTM does it put the included file through the PHP parser. I have the includes as .PHP at present. There is nothing php in the header or footer as yet. I am looking at saving the server some cycles by doing this. Michael -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include statement
Just one thing to add here: My query is: If i load the header as .HTM does it put the included file through the PHP parser. I have the includes as .PHP at present. There is nothing php in the header or footer as yet. I am looking at saving the server some cycles by doing this. Not sure exactly how you have your page structure, but the command include_once() will force PHP to only load a page once per request. Any file which is include'd will pass through the PHP interpreter. If this is really a large concern you can get software that will cache the PHP bytecode. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
It's not.. It exists in other SAPIs as well unless I'm misstaken (there was discussion on it anyway), including ISAPI which IIS uses unless PHP is installed as cgi.. Not sure at all about this though.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Mikey [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] virtual is an Apache specific function, and AFAIK they haven't put ASP support into Apache yet. Let's hope they never do ;-) - Original Message - From: Dvdmandt [EMAIL PROTECTED] Newsgroups: php.windows To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 9:51 PM Subject: Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 I'd lookup virtual()... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Trevor Gryffyn [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] The problem is that the web server looks at the file type and determines what to do with it before it sends anything to the web browser. Your .PHP file is being sent to a PHP interpreter which outputs certain things that get sent to the browser. What's going to happen in this case is that ASP code is going to be inserted, sent to the PHP interpreter and nothing's going to happen Or if you have your PHP set up to see % % as PHP, then you'll probably get some kind of unknown function error. The reason the .HTM file works ok is that HTML is passed straight through the PHP interpreter to the browser. What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp in that so the web server is pulling a .ASP file without anything else, therefore interpreting it as an ASP file. Does any of that make sense? -TG -Original Message- From: Raj Gopal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:19 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
Sorry, I was misstaken.. It's nsapi that has a virtual, which is however called nsapi_virtual.. Also, there are several ASP for Apache projects.. Someone mentioned the one from sun. There's also one named iASP.. And OpenASP, mod_vb and Apache::ASP (ASP with Perl syntax).. For ASP.NET there is also mod_mono.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Dvdmandt [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] It's not.. It exists in other SAPIs as well unless I'm misstaken (there was discussion on it anyway), including ISAPI which IIS uses unless PHP is installed as cgi.. Not sure at all about this though.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Mikey [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] virtual is an Apache specific function, and AFAIK they haven't put ASP support into Apache yet. Let's hope they never do ;-) - Original Message - From: Dvdmandt [EMAIL PROTECTED] Newsgroups: php.windows To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 9:51 PM Subject: Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 I'd lookup virtual()... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Trevor Gryffyn [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] The problem is that the web server looks at the file type and determines what to do with it before it sends anything to the web browser. Your .PHP file is being sent to a PHP interpreter which outputs certain things that get sent to the browser. What's going to happen in this case is that ASP code is going to be inserted, sent to the PHP interpreter and nothing's going to happen Or if you have your PHP set up to see % % as PHP, then you'll probably get some kind of unknown function error. The reason the .HTM file works ok is that HTML is passed straight through the PHP interpreter to the browser. What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp in that so the web server is pulling a .ASP file without anything else, therefore interpreting it as an ASP file. Does any of that make sense? -TG -Original Message- From: Raj Gopal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:19 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
virtual is an Apache specific function, and AFAIK they haven't put ASP support into Apache yet. Let's hope they never do ;-) - Original Message - From: Dvdmandt [EMAIL PROTECTED] Newsgroups: php.windows To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 9:51 PM Subject: Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 I'd lookup virtual()... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Trevor Gryffyn [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] The problem is that the web server looks at the file type and determines what to do with it before it sends anything to the web browser. Your .PHP file is being sent to a PHP interpreter which outputs certain things that get sent to the browser. What's going to happen in this case is that ASP code is going to be inserted, sent to the PHP interpreter and nothing's going to happen Or if you have your PHP set up to see % % as PHP, then you'll probably get some kind of unknown function error. The reason the .HTM file works ok is that HTML is passed straight through the PHP interpreter to the browser. What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp in that so the web server is pulling a .ASP file without anything else, therefore interpreting it as an ASP file. Does any of that make sense? -TG -Original Message- From: Raj Gopal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:19 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
I believe there's ChiliSoftASP or something that'll do ASP on Apache. -TG -Original Message- From: Mikey [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 21, 2004 6:52 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 virtual is an Apache specific function, and AFAIK they haven't put ASP support into Apache yet. Let's hope they never do ;-) - Original Message - From: Dvdmandt [EMAIL PROTECTED] Newsgroups: php.windows To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 9:51 PM Subject: Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 I'd lookup virtual()... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Trevor Gryffyn [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] t.aircargo.com... The problem is that the web server looks at the file type and determines what to do with it before it sends anything to the web browser. Your .PHP file is being sent to a PHP interpreter which outputs certain things that get sent to the browser. What's going to happen in this case is that ASP code is going to be inserted, sent to the PHP interpreter and nothing's going to happen Or if you have your PHP set up to see % % as PHP, then you'll probably get some kind of unknown function error. The reason the .HTM file works ok is that HTML is passed straight through the PHP interpreter to the browser. What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp in that so the web server is pulling a .ASP file without anything else, therefore interpreting it as an ASP file. Does any of that make sense? -TG -Original Message- From: Raj Gopal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:19 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
On Friday 17 September 2004 20:36, I wrote: ?php include('http://wherever.example.com/poll.asp'); ? A safer option if your asp page does not generate any php code you wish to execute would be: ?php readfile('http://wherever.example.com/poll.asp'); ? -- Phil Driscoll -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
I'd lookup virtual()... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Trevor Gryffyn [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] The problem is that the web server looks at the file type and determines what to do with it before it sends anything to the web browser. Your .PHP file is being sent to a PHP interpreter which outputs certain things that get sent to the browser. What's going to happen in this case is that ASP code is going to be inserted, sent to the PHP interpreter and nothing's going to happen Or if you have your PHP set up to see % % as PHP, then you'll probably get some kind of unknown function error. The reason the .HTM file works ok is that HTML is passed straight through the PHP interpreter to the browser. What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp in that so the web server is pulling a .ASP file without anything else, therefore interpreting it as an ASP file. Does any of that make sense? -TG -Original Message- From: Raj Gopal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:19 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
The problem is that the web server looks at the file type and determines what to do with it before it sends anything to the web browser. Your .PHP file is being sent to a PHP interpreter which outputs certain things that get sent to the browser. What's going to happen in this case is that ASP code is going to be inserted, sent to the PHP interpreter and nothing's going to happen Or if you have your PHP set up to see % % as PHP, then you'll probably get some kind of unknown function error. The reason the .HTM file works ok is that HTML is passed straight through the PHP interpreter to the browser. What you'd have to do is maybe use an IFRAME (HTML) and put the poll.asp in that so the web server is pulling a .ASP file without anything else, therefore interpreting it as an ASP file. Does any of that make sense? -TG -Original Message- From: Raj Gopal [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 5:19 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4 Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
On Thursday 16 September 2004 22:18, Raj Gopal wrote: Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! If you want poll.asp to execute and generate some output for inclusion in the php script, you could do ?php include('http://wherever.example.com/poll.asp'); ? But make sure that you are in control of poll.asp and that it cannot generate any dangerous php code. Cheers -- Phil Driscoll -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] INCLUDE ASP does Not Work! for PHP - 4.3.4
Hi All, I have included a ASP file in a PHP script as follows ? include 'poll.asp' ? and it does not work! whereas ? include 'AA.htm' ? works fine Appreciate your help for any workarounds or Syntax issues -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include() problem
Hi ! A very simple reason: D:\LOCAL\src\php-4.3.2\main\config.w32.h(16): #define PHP_INCLUDE_PATH.;c:\\php4\\pear Eric At 02:07 07/11/2003, you wrote: Hi all, I'm having a problem with my scripts in that I'm having the follwoing error message when I try to include a file into a script... Warning: Failed opening 'C:\Program Files\Apache Group\Apache\htdocs\mymarket emplates\header.php' for inclusion (include_path='.;c:\php4\pear') in C:\Program Files\Apache Group\Apache\htdocs\mymarket\index.php on line 22 why is this showing up within my error message, (include_path='.;c:\php4\pear')? Within the php.ini file the inlcude_path directive is commented out, so I doubt thats the cause. Cheers guys Trystan Hughes [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] include() problem
Sorry ! It is part of the PHP sources in fact ! .;c:\\php4\\pear Is the default include path when none is specified in the php.ini file I've mentionned the header file of the PHP sources where it is defined in fact ;) Eric At 11:57 07/11/2003, [EMAIL PROTECTED] wrote: Sorry, I don't understand what you mean? :-s At 11:57 07/11/2003, [EMAIL PROTECTED] wrote: In a message dated 11/7/2003 10:29:29 GMT Standard Time, [EMAIL PROTECTED] writes: A very simple reason: D:\LOCAL\src\php-4.3.2\main\config.w32.h(16): #define PHP_INCLUDE_PATH.;c:\\php4\\pear Sorry, I don't understand what you mean? :-s Tryst -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] include() problem
Hi all, I'm having a problem with my scripts in that I'm having the follwoing error message when I try to include a file into a script... Warning: Failed opening 'C:\Program Files\Apache Group\Apache\htdocs\mymarket emplates\header.php' for inclusion (include_path='.;c:\php4\pear') in C:\Program Files\Apache Group\Apache\htdocs\mymarket\index.php on line 22 why is this showing up within my error message, (include_path='.;c:\php4\pear')? Within the php.ini file the inlcude_path directive is commented out, so I doubt thats the cause. Cheers guys Trystan Hughes [EMAIL PROTECTED]
[PHP-WIN] Include and require
Dear All, Can any of you tell me what is the difference between include and require ? Regards, Rinku -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Include and require
if an include fails for whatever reason the script will continue executing and just issue a warning. If a require fails the script will throw an error and exit (it won't execute the remainder of the script). -Original Message- From: Rinku Shivnani [mailto:[EMAIL PROTECTED] Sent: 20 October 2003 11:22 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Include and require Dear All, Can any of you tell me what is the difference between include and require ? Regards, Rinku -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. **
RE: [PHP-WIN] Include and require
Hi David, Can you explain me the same thing with some examples.. Pls. Regards, Rinku -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Include and require
Browse through http://ww.php.net , search and read the documentation. If you do that and search for include, for instance, you will find The documentation below also applies to require(). The two constructs are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless. Be sure to have an appropriate include_path setting as well. Luis - Original Message - From: Rinku Shivnani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 20, 2003 11:21 AM Subject: [PHP-WIN] Include and require Dear All, Can any of you tell me what is the difference between include and require ? Regards, Rinku -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] include within html
Hi A simple (?) question : When doing this html body ?php include 'setup_vars.php'; ... the whole of SETUP_VARS.php is written to the screen, instead of bieng executed. What am I doing wrong ? Thanks Luis -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] include, phpself and inline frames
Howdy all, I am trying to get a poll to work on my site. I am using Inline frames to display the content. The poll is outside of the iframe and is put in using ? include(poll.php); ? What I was aiming to do was, when you click vote to submit your vote, the results would appear in the Iframe. So in poll.php i have: form method=post action=?=$PHP_SELF ? target=Iframe (this isn't in between ? ?) I tried it by inserting the full code of poll.php into page rather than use include(), but it displayed the whole page again into the inline frame. How would I go about just getting the poll.php file to appear in the inline frame? I thought using include() would work as it does when you use it with asp. I will eventually remove the inline frame, but for now i'm using them. Any help is appreciated, /m1nt -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] include, phpself and inline frames
Make the action of the form poll.php instead of $PHP_SELF. $PHP_SELF is the parent document. Matt |-Original Message- |From: m1nt ch3w [mailto:[EMAIL PROTECTED] |Sent: Saturday, February 22, 2003 3:27 AM |To: [EMAIL PROTECTED] |Subject: [PHP-WIN] include, phpself and inline frames | | |Howdy all, | |I am trying to get a poll to work on my site. I am using |Inline frames to |display the content. The poll is outside of the iframe and is |put in using |? include(poll.php); ? | |What I was aiming to do was, when you click vote to submit |your vote, the |results would appear in the Iframe. | |So in poll.php i have: | |form method=post action=?=$PHP_SELF ? target=Iframe |(this isn't in between ? ?) | |I tried it by inserting the full code of poll.php into page |rather than use |include(), but it displayed the whole page again into the |inline frame. How |would I go about just getting the poll.php file to appear in |the inline |frame? I thought using include() would work as it does when |you use it with |asp. | |I will eventually remove the inline frame, but for now i'm using them. | |Any help is appreciated, |/m1nt | | |-- |PHP Windows Mailing List (http://www.php.net/) |To unsubscribe, visit: http://www.php.net/unsub.php | | | -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include virtual?
For those familiar with asp does php have something similar to the include virtual? I don't want to have to use the full system path to include a template that is at the doc_root of the site. Include_virtual(/template.php); ?? This would include the template.php at the root of the site instead of the root of the drive. Thanks Charles Killmer Windows 2000 Server IIS 5.0 PHP 4.2.3
RE: [PHP-WIN] Include virtual?
I've wondered this before also but currently use; include($_SERVER[DOCUMENT_ROOT].'/'.'template.php') Be interested if there is an easier way! .:Fran -Original Message- From: Charles P. Killmer [mailto:[EMAIL PROTECTED]] Sent: 05 February 2003 14:46 To: php-windows Subject: [PHP-WIN] Include virtual? For those familiar with asp does php have something similar to the include virtual? I don't want to have to use the full system path to include a template that is at the doc_root of the site. Include_virtual(/template.php); ?? This would include the template.php at the root of the site instead of the root of the drive. Thanks Charles Killmer Windows 2000 Server IIS 5.0 PHP 4.2.3 Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Include virtual?
That way wontt work in my situation so I made a function that does. Thanks for the idea. function include_virtual($FileToInclude) { if (substr($FileToInclude,0,1) != /) { $FileToInclude = /.$FileToInclude; } $FileToInclude = str_replace(/,\\,$FileToInclude); $ScriptName = str_replace(/,\\,$_SERVER[SCRIPT_NAME]); $DocRoot = str_replace($ScriptName,,$_SERVER[PATH_TRANSLATED]); include($DocRoot.$FileToInclude); } Charles -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 8:50 AM To: Charles P. Killmer; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Include virtual? I've wondered this before also but currently use; include($_SERVER[DOCUMENT_ROOT].'/'.'template.php') Be interested if there is an easier way! .:Fran -Original Message- From: Charles P. Killmer [mailto:[EMAIL PROTECTED]] Sent: 05 February 2003 14:46 To: php-windows Subject: [PHP-WIN] Include virtual? For those familiar with asp does php have something similar to the include virtual? I don't want to have to use the full system path to include a template that is at the doc_root of the site. Include_virtual(/template.php); ?? This would include the template.php at the root of the site instead of the root of the drive. Thanks Charles Killmer Windows 2000 Server IIS 5.0 PHP 4.2.3 Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] @include ...
Hello, I have a question about a syntax I had not noticed until now and I could not find an explanation for the inclusion of the character in from of function statment ... What's the difference between these: (1) include(../lang/english/trad4all.inc.php); (2) include(../lang/english/trad4all.inc.php); What does the indicate in fron of the include ? Anyone have any clue? God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] @include ...
At 23:01 2002-09-24 +0200, Wolfgang Schneider wrote: Hello, I have a question about a syntax I had not noticed until now and I could not find an explanation for the inclusion of the character in from of function statment ... What's the difference between these: (1) include(../lang/english/trad4all.inc.php); (2) include(../lang/english/trad4all.inc.php); What does the indicate in fron of the include ? Anyone have any clue? God bless you with His grace and peace Wolfgang the at ()-sign in front of a function surpresses error messages from it afaik. so if you tried to include a missing include file, an -sign in front of your include would simply run silent even if it was unable to include the specified file. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] include() and file() on remote files
the include function does not work on Win32 platforms on remote files (http). I faced also problems with nested!!! file function on remote files (http). Does anybody know, if the lack of remote access of include() and file() could also occure on other OS? thx, Rudolf -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] include() and file() on remote files
So far as I know, Linux etc does not have any problem with a statement such as include(http://www.yahoo.com;); However it is fairly simple to work around in Windows, I do it all the time. The following code will produce the same output: ? $fp = @fopen(http://www.yahoo.com,r;); while(!feof($fp) $fp) { echo fread($fp, 4096); } @fclose($fp); ? HTH Ross -Original Message- From: Rudolf Staribacher [mailto:[EMAIL PROTECTED]] Sent: 26 August 2002 22:16 To: [EMAIL PROTECTED] Subject: [PHP-WIN] include() and file() on remote files the include function does not work on Win32 platforms on remote files (http). I faced also problems with nested!!! file function on remote files (http). Does anybody know, if the lack of remote access of include() and file() could also occure on other OS? thx, Rudolf -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include problems
I have PHP4 on both a windows IIS server and a windows apache server. The include function only works in the same directory of the file I wish to access. ex. www.include.com/default.php all files in same directory (i guess the root)? ?php include 'test.inc' ? everything works fine. Here's where I have the problem. Now I want to store all my includes in one directory www.include.com/inc ?php include 'inc/test.inc' ? that doesn't work Warning: Failed opening 'test.inc' for inclusion (include_path='') Can anyone help me with this??? Thanks scott -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include Issues Windoes 2000
I have two server FS = File Server WS = Web server WS is IIS and is conecting to a share on FS. So the path to the PHP files is \\FS\iisweb\phpfiles\ So if i call test.php and that is located at http://WS/client/test.php and config is at http:\\WS\phpfiles\config.php test.php has this as a line: include(\\FS\iisweb\phpfiles\config.php) or include(..\phpfiles\config.php) I get that a file can not be found Does PHP for windows work with Shares? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Include Issues Windoes 2000
2 things: 1. Your webserver should be running as IUSR_something which as far as I know, may have no network access, or permissions by default. There was a like topic discussed recently on this list. I don't use IIS (YAY!) so I'm not really sure. Check your permissions. Then double check them. 2. Try using forward slashes instead of backslashes. PHP and other cross platform software don't take kindly to Windows' standard of backslashes. If you're dead set on backslashes, use them twice (i.e. \\ for \ and for \\). Good luck! -Original Message- From: Chris Schmidt [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Include Issues Windoes 2000 I have two server FS = File Server WS = Web server WS is IIS and is conecting to a share on FS. So the path to the PHP files is \\FS\iisweb\phpfiles\ So if i call test.php and that is located at http://WS/client/test.php and config is at http:\\WS\phpfiles\config.php test.php has this as a line: include(\\FS\iisweb\phpfiles\config.php) or include(..\phpfiles\config.php) I get that a file can not be found Does PHP for windows work with Shares? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Include Issues Windoes 2000
I doubt... (i've no reason to believe that it doesn't work, but if it doesn't i would assume it to be a bug in windows filesystem-networksystem layer)... Anyway, the better way is to create a distributed file system and/or map the share as if it was a directory in one of the WS machine... That way, PHP doesn't need to know where are the files, it assumes that they are reachable directly... Cheers... Luis Ferro Chris Schmidt wrote: I have two server FS = File Server WS = Web server WS is IIS and is conecting to a share on FS. So the path to the PHP files is \\FS\iisweb\phpfiles\ So if i call test.php and that is located at http://WS/client/test.php and config is at http:\\WS\phpfiles\config.php test.php has this as a line: include(\\FS\iisweb\phpfiles\config.php) or include(..\phpfiles\config.php) I get that a file can not be found Does PHP for windows work with Shares? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Include ()
Check your PHP.INI file for settings related to automatic escaping of characters. And, uh, you say it's a forward slash like '/', but are you sure they aren't backslashes like '\'? I've never heard of forward slashes getting added. Are you positive that the text files don't have the slashes? If not, then it has something to do with magic quotes, perhaps magic_quotes_runtime. -Mike At 11:57 PM 3/13/2002 -0500, you wrote: When i use the Include() command for a text file it always puts a slash, / , in front of any qotations in the text file. anyone know why? my example is http://www.notchmetal.com/bio/ thanks -Sean- Mike Flynn - Burlington, VT http://www.mikeflynn.net/ - [EMAIL PROTECTED] home=work=home=store=home -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Include ()
When i use the Include() command for a text file it always puts a slash, / , in front of any qotations in the text file. anyone know why? my example is http://www.notchmetal.com/bio/ thanks -Sean-
Re: [PHP-WIN] Include()
Have u tried using soap tee hee hee (sorry...couldn't resist!) Ignatius - Original Message - From: Shrock, Court [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 7:13 AM Subject: RE: [PHP-WIN] Include() hweb services.I am curious about an alternative to .Net and Sun for web services.anybody? -Original Message- From: alain samoun [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 11:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Include() Ross: No, it's not what I mean :) Let say that you have a PHP class that I like on your site, for free or a bundle of pounds, you give me permission to use this class from my site to your site (include it on my site) without even giving me your source. Anyway, I know there are other ways to do that... A+ Alain -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
hweb services.I am curious about an alternative to .Net and Sun for web services.anybody? -Original Message- From: alain samoun [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 11:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Include() Ross: No, it's not what I mean :) Let say that you have a PHP class that I like on your site, for free or a bundle of pounds, you give me permission to use this class from my site to your site (include it on my site) without even giving me your source. Anyway, I know there are other ways to do that... A+ Alain -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
If you think it over that could be a real security hazard. If I have a phpdoc that opens sqlconnections at server A and includes that doc over at server B then I will be able to get stuff from server A right in front of my eyes, or? No one ever said that server A was my own. /bro. (i just hate that it isn't reply to: listadres) -Original Message- From: alain samoun [mailto:[EMAIL PROTECTED]] Sent: den 22 januari 2002 03:52 To: Shrock, Court; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Include() Humm, I do not know if I understand you... If you include a file in your server A, it will run in your server locally as part of your code. Now if the included file is located at another server B, it should be all the same, the included file will run as part of your code in server A, isn't it? A+ Alain -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
Alain, The PHP engine can only process php code in files on your local filesystem(*). It just so happens that PHP is smart enough to realize that if a file is not entirely PHP code, the rest must be meant for output to the client (which can be ANY device, not just a human behind a browser). When you include an external resource URL, this is exactly what happens, there is no php code that is seen by your script--it then outputs the results of the external URL to the client that is accessing your resource. (*) Network shares and other like resources are transparently (and sometimes temporarily) attached to your filesystem by the operating system. Hippie, I wonder if apache/PHP on windows will allow it? You could always move to a superior OSg Try this: $fp = fopen('http://www.yourtarget.com/include.html'); fpassthru($fp); fclose($fp); -Original Message- Humm, I do not know if I understand you... If you include a file in your server A, it will run in your server locally as part of your code. Now if the included file is located at another server B, it should be all the same, the included file will run as part of your code in server A, isn't it? A+ Alain -Original Message- I'm not using it to include remote php files as I assumed it would still onlu be able to process the file after it was parsed by the remote system. I do however need to include remote html files which should not be affected by this problem. Hippie. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
OK guys, it's not possible... But before I crawl back under my stone, I want to say that it could be a nice feature, of course with the right security - like username and password - such include could allow the sharing of code between people. A+ Alain -Original Message- From: brother [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 22, 2002 9:24 AM To: '[EMAIL PROTECTED]' Subject: RE: [PHP-WIN] Include() If you think it over that could be a real security hazard. If I have a phpdoc that opens sqlconnections at server A and includes that doc over at server B then I will be able to get stuff from server A right in front of my eyes, or? No one ever said that server A was my own. /bro. (i just hate that it isn't reply to: listadres) -Original Message- From: alain samoun [mailto:[EMAIL PROTECTED]] Sent: den 22 januari 2002 03:52 To: Shrock, Court; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Include() Humm, I do not know if I understand you... If you include a file in your server A, it will run in your server locally as part of your code. Now if the included file is located at another server B, it should be all the same, the included file will run as part of your code in server A, isn't it? A+ Alain -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] Include()
Has anyone been able to use the include() statement with a URL in the windows version of php? I've tried v4.0.6 and v4.1.1 and neither of them seem to work. Function is as follows. include('http://www.tol.com.au/default.htm'); I have checked and made sure that allow_url_fopen is enabled in the ini file but I can't find any other config that needs to be changed in order to get this to work. Hippie.
RE: [PHP-WIN] Include()
You are right, it doesn't seem to work with windows, I don't know if it works with *nix either? But you can include your file as: include(http://whatever/yourfile.php;); A+ Alain -Original Message- From: John (News) [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 3:34 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Include() Has anyone been able to use the include() statement with a URL in the windows version of php? I've tried v4.0.6 and v4.1.1 and neither of them seem to work. Function is as follows. include('http://www.tol.com.au/default.htm'); I have checked and made sure that allow_url_fopen is enabled in the ini file but I can't find any other config that needs to be changed in order to get this to work. Hippie. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
Yes, it works on Linux/Apache. But the results are not what you might expect. When one normally uses the include statement, you intend to process some php file, not the output from such a file. For example: nfo.php contains, located at http://www.myserver.com/nfo.php : --BEGIN FILE- ?php function nfo($addr) { return getnamebyaddr($addr); } echo nfo($REMOTE_ADDR); ? ---END FILE--- test.php contains, located at http://www.otherserver.com/test.php : --BEGIN FILE- ?php include('http://www.myserver.com/nfo.php'); echo nfo($REMOTE_ADDR); ? ---END FILE--- When you visit http://www.otherserver.com/test.php, the nfo function is not defined, but results are returned by the include because the server connects to http://www.myserver.com and correctly includes the results (output) from that visit. It is essentially an alternative to fopen('http://www.myserver.com/nfo.php') if you just want to echo all the results of the fopen. -Original Message- You are right, it doesn't seem to work with windows, I don't know if it works with *nix either? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
Humm, I do not know if I understand you... If you include a file in your server A, it will run in your server locally as part of your code. Now if the included file is located at another server B, it should be all the same, the included file will run as part of your code in server A, isn't it? A+ Alain -Original Message- From: Shrock, Court [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 4:38 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Include() Yes, it works on Linux/Apache. But the results are not what you might expect. When one normally uses the include statement, you intend to process some php file, not the output from such a file. For example: nfo.php contains, located at http://www.myserver.com/nfo.php : --BEGIN FILE- ?php function nfo($addr) { return getnamebyaddr($addr); } echo nfo($REMOTE_ADDR); ? ---END FILE--- test.php contains, located at http://www.otherserver.com/test.php : --BEGIN FILE- ?php include('http://www.myserver.com/nfo.php'); echo nfo($REMOTE_ADDR); ? ---END FILE--- When you visit http://www.otherserver.com/test.php, the nfo function is not defined, but results are returned by the include because the server connects to http://www.myserver.com and correctly includes the results (output) from that visit. It is essentially an alternative to fopen('http://www.myserver.com/nfo.php') if you just want to echo all the results of the fopen. -Original Message- You are right, it doesn't seem to work with windows, I don't know if it works with *nix either? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] Include()
I'm not using it to include remote php files as I assumed it would still onlu be able to process the file after it was parsed by the remote system. I do however need to include remote html files which should not be affected by this problem. Hippie. At 04:38 PM 1/21/02 -0800, you wrote: Yes, it works on Linux/Apache. But the results are not what you might expect. When one normally uses the include statement, you intend to process some php file, not the output from such a file. For example: nfo.php contains, located at http://www.myserver.com/nfo.php : --BEGIN FILE- ?php function nfo($addr) { return getnamebyaddr($addr); } echo nfo($REMOTE_ADDR); ? ---END FILE--- test.php contains, located at http://www.otherserver.com/test.php : --BEGIN FILE- ?php include('http://www.myserver.com/nfo.php'); echo nfo($REMOTE_ADDR); ? ---END FILE--- When you visit http://www.otherserver.com/test.php, the nfo function is not defined, but results are returned by the include because the server connects to http://www.myserver.com and correctly includes the results (output) from that visit. It is essentially an alternative to fopen('http://www.myserver.com/nfo.php') if you just want to echo all the results of the fopen. -Original Message- You are right, it doesn't seem to work with windows, I don't know if it works with *nix either? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] Include files seem sqiffy
You should use your real e-mail as your return address so I can respond to you privately. Some messages aren't deserving of a message to the whole list. This is a recommendation to everyone on the list because it's certainly not the first time that I've wanted to give someone private advice only to notice that they used a no spam e-mail address.. -Mike At 10:38 PM 11/12/2001 +, [EMAIL PROTECTED] wrote: I am trying to install a php/mysql board but get warnings about Undefined variable: . It appears to be linked to the use of include files. Are these somewhat different under Doze? I'm a bit of a newbie with php but it does appear some php code needs tweaking to work in windows. Any pointers greatfully accepted! -=- Mike Flynn - Burlington, VT -=- [EMAIL PROTECTED] http://www.mikeflynn.net/ * Give blood * ...maintaining lawns, watching televised sports, birthing children, listening to Top 40 music, and collecting stuffed animals... -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] Include files seem sqiffy
I am trying to install a php/mysql board but get warnings about Undefined variable: . It appears to be linked to the use of include files. Are these somewhat different under Doze? I'm a bit of a newbie with php but it does appear some php code needs tweaking to work in windows. Any pointers greatfully accepted! -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include(remote host) under w2k problem
Hi all. I have searched almost everything on the net regarding php and windows focusing on one thing. How to include to php script started on apache on w2k external sript placed on some URL. Source of test script (http://mylocalhost/marek.php) ? include("http://hermes.com.pl/test.php"); ? and answer viewed in browser "Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion (include_path='') in c:\www\hermes\windykacja\marek.php on line 2" I know that parser sayes that include_path is not correctly set but, when I'm trying do the same under Linux - works perfectly. So (I'm sure -because Include_path has other adaptation) it is not the reason. Will be wery glad for answer. Even "Leave it !" - but with explanation ;-))) Marek. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-WIN] include(remote host) under w2k problem
I would assume, that because linux is built around networking, making a reference to http://whatever would tell linux to look on the internet for the file. window isn't built the same way, so it doesn't know to look beyond it's filing system. As to a solution, I'm not sure. I'd look into fopen perhaps? You could copy the external script to your local drive, then include it. However, I've just had a though, surely when you request the .php file the http server it is held on will parse it and return the output of it. If that's OK, then the following code should do it. ? $ExternalFile="http://whatever/file.xyz"; $LocalFile="localname.html"; $fp = @fopen($ExternalFile,"r"); if ($fp) { $outhandle=fopen ($LocalFile,"w"); while (!feof($fp)) { $buffer=fread($fp,4096); fputs($outhandle,$buffer); } fclose($fp); fclose($outhandle); include("$LocalFile"); exec("delete.bat"); } ? and delete.bat contains just del localname.html That works for me (just tested it). Anyone know a neater way? Ross -Original Message- From: Marek Wysmulek [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:46 To: [EMAIL PROTECTED] Subject: [PHP-WIN] include("remote host") under w2k problem Hi all. I have searched almost everything on the net regarding php and windows focusing on one thing. How to include to php script started on apache on w2k external sript placed on some URL. Source of test script (http://mylocalhost/marek.php) ? include("http://hermes.com.pl/test.php"); ? and answer viewed in browser "Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion (include_path='') in c:\www\hermes\windykacja\marek.php on line 2" I know that parser sayes that include_path is not correctly set but, when I'm trying do the same under Linux - works perfectly. So (I'm sure -because Include_path has other adaptation) it is not the reason. Will be wery glad for answer. Even "Leave it !" - but with explanation ;-))) Marek. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
PD: [PHP-WIN] include(remote host) under w2k problem
Dear Ross. Thanx a lot. Pretty works. You even don't know how did you help me. Marek. - Original Message - From: Ross Fleming [EMAIL PROTECTED] Newsgroups: php.windows To: [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 8:11 PM Subject: RE: [PHP-WIN] include("remote host") under w2k problem I would assume, that because linux is built around networking, making a reference to http://whatever would tell linux to look on the internet for the file. window isn't built the same way, so it doesn't know to look beyond it's filing system. As to a solution, I'm not sure. I'd look into fopen perhaps? You could copy the external script to your local drive, then include it. However, I've just had a though, surely when you request the .php file the http server it is held on will parse it and return the output of it. If that's OK, then the following code should do it. ? $ExternalFile="http://whatever/file.xyz"; $LocalFile="localname.html"; $fp = @fopen($ExternalFile,"r"); if ($fp) { $outhandle=fopen ($LocalFile,"w"); while (!feof($fp)) { $buffer=fread($fp,4096); fputs($outhandle,$buffer); } fclose($fp); fclose($outhandle); include("$LocalFile"); exec("delete.bat"); } ? and delete.bat contains just del localname.html That works for me (just tested it). Anyone know a neater way? Ross -Original Message- From: Marek Wysmulek [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:46 To: [EMAIL PROTECTED] Subject: [PHP-WIN] include("remote host") under w2k problem Hi all. I have searched almost everything on the net regarding php and windows focusing on one thing. How to include to php script started on apache on w2k external sript placed on some URL. Source of test script (http://mylocalhost/marek.php) ? include("http://hermes.com.pl/test.php"); ? and answer viewed in browser "Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion (include_path='') in c:\www\hermes\windykacja\marek.php on line 2" I know that parser sayes that include_path is not correctly set but, when I'm trying do the same under Linux - works perfectly. So (I'm sure -because Include_path has other adaptation) it is not the reason. Will be wery glad for answer. Even "Leave it !" - but with explanation ;-))) Marek. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
re: [PHP-WIN] include(remote host) under w2k problem
Sorry? I'm a little confused what you're saying. :-) I gather it works though? The email I sent may have been a bit mixed up, the answer kind of came to me as I was typing it, then I checked it to see if it worked and then sent it to you. I hope it's working for you OK! :) Ross -Original Message- From: Marek Wysmulek [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 21:58 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: PD: [PHP-WIN] include("remote host") under w2k problem Dear Ross. Thanx a lot. Pretty works. You even don't know how did you help me. Marek. - Original Message - From: Ross Fleming [EMAIL PROTECTED] Newsgroups: php.windows To: [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 8:11 PM Subject: RE: [PHP-WIN] include("remote host") under w2k problem I would assume, that because linux is built around networking, making a reference to http://whatever would tell linux to look on the internet for the file. window isn't built the same way, so it doesn't know to look beyond it's filing system. As to a solution, I'm not sure. I'd look into fopen perhaps? You could copy the external script to your local drive, then include it. However, I've just had a though, surely when you request the .php file the http server it is held on will parse it and return the output of it. If that's OK, then the following code should do it. ? $ExternalFile="http://whatever/file.xyz"; $LocalFile="localname.html"; $fp = @fopen($ExternalFile,"r"); if ($fp) { $outhandle=fopen ($LocalFile,"w"); while (!feof($fp)) { $buffer=fread($fp,4096); fputs($outhandle,$buffer); } fclose($fp); fclose($outhandle); include("$LocalFile"); exec("delete.bat"); } ? and delete.bat contains just del localname.html That works for me (just tested it). Anyone know a neater way? Ross -Original Message- From: Marek Wysmulek [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:46 To: [EMAIL PROTECTED] Subject: [PHP-WIN] include("remote host") under w2k problem Hi all. I have searched almost everything on the net regarding php and windows focusing on one thing. How to include to php script started on apache on w2k external sript placed on some URL. Source of test script (http://mylocalhost/marek.php) ? include("http://hermes.com.pl/test.php"); ? and answer viewed in browser "Warning: Failed opening 'http://hermes.com.pl/test.php' for inclusion (include_path='') in c:\www\hermes\windykacja\marek.php on line 2" I know that parser sayes that include_path is not correctly set but, when I'm trying do the same under Linux - works perfectly. So (I'm sure -because Include_path has other adaptation) it is not the reason. Will be wery glad for answer. Even "Leave it !" - but with explanation ;-))) Marek. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include remote files
Anyone know how you can make a work around on remote files includes on a windows system? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include()ing the remote file
Hi, I have PHP 4.0.5 installed on Windows 2000 server. I used include() function and relative paths to include files located under the same web site. When I tried to include() files located on different web site on the same machine with explicit paths, I get the following warning: Warning: Failed opening 'http://myserver/admin/Includes/Test.php' for inclusion (include_path='') in D:\MyFolder\Admin\MasterGroup\MasterGroupIndex.php on line 18 The Test.php file has one echo function in it. I noticed that allow_url_fopen entry is missing from my php.ini file but I did not see any difference even after I added it (allow_url_fopen = On). Thanks for your time and any suggestions to solve this problem will be appreciated. Vasu
Re: [PHP-WIN] include()ing the remote file
From the manual Note: You can't use remote files in include() and require() statements on Windows. HTH Ignatius - Original Message - From: Vasu Gokaraju [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 31, 2001 12:58 AM Subject: [PHP-WIN] include()ing the remote file Hi, I have PHP 4.0.5 installed on Windows 2000 server. I used include() function and relative paths to include files located under the same web site. When I tried to include() files located on different web site on the same machine with explicit paths, I get the following warning: Warning: Failed opening 'http://myserver/admin/Includes/Test.php' for inclusion (include_path='') in D:\MyFolder\Admin\MasterGroup\MasterGroupIndex.php on line 18 The Test.php file has one echo function in it. I noticed that allow_url_fopen entry is missing from my php.ini file but I did not see any difference even after I added it (allow_url_fopen = On). Thanks for your time and any suggestions to solve this problem will be appreciated. Vasu -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include
help...!! ilustration: i got trouble with include on the virtual directory... a myfile.php -- include file on directory includes/test.php why it shouldn't work?. when i moved my file test.php from directoy includes, with the same level of myfile.php directory it's work ? examples: include test.php; -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] include
Try... include(getcwd().'/path/to/file/test.php'); -Mike At 01:37 PM 5/23/01 +0700, you wrote: help...!! ilustration: i got trouble with include on the virtual directory... a myfile.php -- include file on directory includes/test.php why it shouldn't work?. when i moved my file test.php from directoy includes, with the same level of myfile.php directory it's work ? examples: include test.php; -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] include paths
Hello mjrobey, try to replace \ with /: include_path = d:/foxserv/www/include;. mmc Greetings, mmc I'm running Apache with the PHP mod under Windows 2000, but I seem to have mmc a recurring problem with includes. Every time I try to view a page with an mmc include() statement, it returns an error of the following sort: mmc Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: mmc \foxserv\www\home\en\index.php on line 5 mmc I've tried placing the desired PHP file (menutop.php) in the same directory mmc as the index.php, and it returns just fine, but I can't seem to get it to mmc recognize any sort of path, as indicated by the error message. As far as I mmc can tell, my syntax is correct in my php.ini: mmc include_path = d:\foxserv\www\include;. mmc But I keep running into the same problem. I am running a dual boot on mmc separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, mmc perhaps that has something to do with it? If anyone has any insight into mmc the problem it would be much appreciated. mmc -Matthew Robey mmc Maxon Corp. -- Best regards, Ruslan mailto:[EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include paths
Well, thanks for all the input, I tried several different fixes, and combinations of fixes. In the end, giving the complete path in my include () statement did the trick. No amount of tinkering with the include_path variable would get the server to look in the right place. So my php now reads: include (d:\foxserv\www\include\db_maxon.php); Thanks again, -Matthew Robey Maxon Corp. Greetings, I'm running Apache with the PHP mod under Windows 2000, but I seem to have a recurring problem with includes. Every time I try to view a page with an include() statement, it returns an error of the following sort: Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: \foxserv\www\home\en\index.php on line 5 I've tried placing the desired PHP file (menutop.php) in the same directory as the index.php, and it returns just fine, but I can't seem to get it to recognize any sort of path, as indicated by the error message. As far as I can tell, my syntax is correct in my php.ini: include_path = d:\foxserv\www\include;. But I keep running into the same problem. I am running a dual boot on separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, perhaps that has something to do with it? If anyone has any insight into the problem it would be much appreciated. -Matthew Robey Maxon Corp. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include paths
Greetings, I'm running Apache with the PHP mod under Windows 2000, but I seem to have a recurring problem with includes. Every time I try to view a page with an include() statement, it returns an error of the following sort: Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: \foxserv\www\home\en\index.php on line 5 I've tried placing the desired PHP file (menutop.php) in the same directory as the index.php, and it returns just fine, but I can't seem to get it to recognize any sort of path, as indicated by the error message. As far as I can tell, my syntax is correct in my php.ini: include_path = d:\foxserv\www\include;. But I keep running into the same problem. I am running a dual boot on separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, perhaps that has something to do with it? If anyone has any insight into the problem it would be much appreciated. -Matthew Robey Maxon Corp. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] include paths
my include looks like ; ; Paths and Directories ; ; include_path =\apache\includes do you have the quotes ; . in yours?? [EMAIL PROTECTED] wrote: Greetings, I'm running Apache with the PHP mod under Windows 2000, but I seem to have a recurring problem with includes. Every time I try to view a page with an include() statement, it returns an error of the following sort: Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: \foxserv\www\home\en\index.php on line 5 I've tried placing the desired PHP file (menutop.php) in the same directory as the index.php, and it returns just fine, but I can't seem to get it to recognize any sort of path, as indicated by the error message. As far as I can tell, my syntax is correct in my php.ini: include_path = d:\foxserv\www\include;. But I keep running into the same problem. I am running a dual boot on separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, perhaps that has something to do with it? If anyone has any insight into the problem it would be much appreciated. -Matthew Robey Maxon Corp. -- Michael Kelley [EMAIL PROTECTED] Programmer/Systems Analyst I New Mexico State University Information and Communication Technologies Work # (505)-646-1374 P.O. Box 30001 MSC: 3AT Las Cruces, NM 88003 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] include paths
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 17, 2001 12:30 PM Subject: [PHP-WIN] include paths Try typing the include() line in your code like this: include($include_path.\SomeFilenameToInclude); Alan Greetings, I'm running Apache with the PHP mod under Windows 2000, but I seem to have a recurring problem with includes. Every time I try to view a page with an include() statement, it returns an error of the following sort: Warning: Failed opening 'menutop.php' for inclusion (include_path='') in d: \foxserv\www\home\en\index.php on line 5 I've tried placing the desired PHP file (menutop.php) in the same directory as the index.php, and it returns just fine, but I can't seem to get it to recognize any sort of path, as indicated by the error message. As far as I can tell, my syntax is correct in my php.ini: include_path = d:\foxserv\www\include;. But I keep running into the same problem. I am running a dual boot on separate drive partitions, one Windows NT 4.0, one Windows 2000 Server, perhaps that has something to do with it? If anyone has any insight into the problem it would be much appreciated. -Matthew Robey Maxon Corp. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-WIN] include
Good evening all, do you know if its possible to give an absolute path instead of a relative path for include: include( '../../menu.php' );is OK incude( '/inculde/menu.php' ); is Not OK Depend where im in tree directory i have to change '../', then relative path is not usefull in that case. (ASP allows this in include directive with VIRTUAL parameter, so I suppose PHP too?) Olivier. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] include
This is extremely unfortunate as I don't know of a way to do this either. I do however have a workaround that's not too tedious. Insert the following code into the very top of all of your documents: $GLOBALS["DOCUMENT_ROOT"] = preg_replace("/wwwroot.*$/i","wwwroot",$PATH_TRANSLATED); This assumes that your root web folder is wwwroot. Change this as necessary. This enables you to include files like so: include_once($DOCUMENT_ROOT."/includes/main_header.inc.php"); By the way, $DOCUMENT_ROOT is an Apache environment variable so if you happen to be running Apache instead of IIS just leave out the preg_replace call because $DOCUMENT_ROOT will already be set for you. --Toby - Original Message - From: "Olivier Botineau" [EMAIL PROTECTED] To: "PHP Windows list (Adresse de messagerie)" [EMAIL PROTECTED] Sent: Friday, April 20, 2001 6:05 PM Subject: [PHP-WIN] include Good evening all, do you know if its possible to give an absolute path instead of a relative path for include: include( '../../menu.php' ); is OK incude( '/inculde/menu.php' ); is Not OK Depend where im in tree directory i have to change '../', then relative path is not usefull in that case. (ASP allows this in include directive with VIRTUAL parameter, so I suppose PHP too?) Olivier. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-WIN] include
On 20 Apr 2001 14:04:00 -0700, Olivier Botineau [EMAIL PROTECTED] wrote: Good evening all, do you know if its possible to give an absolute path instead of a relative path for include: include( '../../menu.php' ); is OK incude( '/inculde/menu.php' ); is Not OK That's the correct syntax for an absolute path but it's relative to the webroot - you'll need to add in the full path - e.g. "/www/site/include/menu.php" or "C:/IIS/site/include/menu.php". I generally prefer to set include_path for each virtual host so I can place included files outside of the webroot and not have to worry about paths. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]