Using external php script in html file

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Using external php script in html file

Postby sprinkel » 29. August 2009 01:49

Dear all,

I'm a new PHP user and I recently installed XAMPP for windows version 1.7.2

I want to use http://localhost as a develop and test environment.
I've noticed that I can onlu test PHP files, but I also want to test html files with calls to a seperate PHP script.

Is it possible to configure localhost in that way that it also supports testing html files using external pHP scripts?

Thank you in advance,
Cees
sprinkel
 
Posts: 16
Joined: 29. August 2009 01:38
Location: Netherlands
Operating System: Windows Vista

Re: Using external php script in html file

Postby Wiedmann » 29. August 2009 10:01

with calls to a seperate PHP script.

What does this mean?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Using external php script in html file

Postby dmphotography » 29. August 2009 11:02

Yes and No,
depending on what you mean by "external" PHP files.

In almost every case, you can call on any php file that is located on the same server as the HTML file or PHP file calling on it.

However in most cases, you can't call on a PHP file located on another server because it will be parsed by that server's PHP engine and only
return as HTML, NOT PHP. The other server would have to have PHP disabled.

I know there's exceptions to this and that's why I gave indefinite answers, but I don't know what they are because I too am just learning PHP.

I hope that answers your question.
For great video and written tutorials and guides on creating your own web server and installing things such as forums, blogs, etc., visit http://myownhomeserver.com
dmphotography
 
Posts: 191
Joined: 15. December 2008 14:25
Location: Columbus, MS
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 69 guests