Jump to content


PHP/Apache Vs. PHP/Windows IIS

  • Please log in to reply
1 reply to this topic

#1 mvosoughi

  • Members
  • PipPip
  • Member
  • 18 posts

Posted 07 March 2006 - 11:24 AM

Hi, is there any difference between calling pages contents between PHP on Apcahe versus PHP on IIS? My problem is under PHP/Apache I used include command to call in pages contents (index.php?page=2) but under PHP/Windows platform, it cannot pass the page contents or page title and it only calls the page=0 contents.

As I said, my codes works under PHP/Apache and I have no problem calling in the contents of each page using switch statement ...

Any ideas how to solve this problem?

Here is a sample of my codes:

include "contents.php";

include "pages/$content";
switch ($page)
case 0:
$content = "main.php";
$title = "Main";

case 1:
$content = "page2.php";
$title = "Page two";

#2 txmedic03

  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 07 March 2006 - 01:16 PM

That depends on how you pass the variables to your page. Is $page supposed to be something like index.php?page=0? If this is the case I would suggest using $_GET['page'] because your server may not be configured to use $page. It is safer that way and it is a better coding practice to go for a universal compatibility. Additionally, if you are interested, I could make suggestions on ways to possibily simplify your script. Only if you are interested in my help.

Happy coding!


You can install Apache on windows platforms. I personally prefer working with Apache.


I can't stop you from doing something silly, but at least I can help you do it right.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users