I just uploaded a website that I build in windows to Linux Server. I wonder why not all codes loaded correctly. The website does not appears as good and there are some errors in it (such as the includes codes).

What's the difference between creating website in Linux and Windows using php?


Here is the codes:



<link href= "css/style.css" rel="stylesheet" type="text/css" media="screen">

<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/chili-1.7.pack.js"></script>
<script src="js/jquery.cycle.all.js" type="text/javascript"></script>
<script src="js/jquery.easing.1.3.js" type="text/javascript" ></script>

<script type="text/javascript">
    fx:     'fade', 
    speed:   900, 
    timeout: 10000, 
    pager:  '#nav', 
    pagerAnchorBuilder: function(idx, slide) { 
        // return selector string for existing anchor 
        return '#nav li:eq(' + idx + ') a'; 

<?php  include('includes/navigation.php'); ?>


<div id="container">

<div id="demos">
    <div id="slideshow" class="pics">
        <img src="images/indonusa1.jpg" />
        <img src="images/indonusa2.jpg" />
        <img src="images/indonusa3.jpg" />   

    <ul id="nav">
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>   

<?php /*

        <script type="text/javascript">$("body").css("background-image", "url('images/indonusa1.jpg')");</script>   
        <script type="text/javascript">$("body").css("background-image", "url('images/indonusa2.jpg')");</script>   
        <script type="text/javascript">$("body").css("background-image", "url('images/indonusa3.jpg')");</script>        

        <img src="images/indonusa1.jpg" />
        <img src="images/indonusa2.jpg" />
        <img src="images/indonusa3.jpg" />       

        <img style="background-image: url('../images/indonusa1.jpg');">
        <img style="background-image: url('../images/indonusa2.jpg');">
        <img style="background-image: url('../images/indonusa3.jpg');">
*/ ?>       

<div id="product1"><a href="connection.php"><img src="images/connection.jpg"></a></div>
<div id="product2"><a href="collaboration.php"><img src="images/collaboration.jpg"></a></div>
<div id="product3"><a href="solution.php"><img src="images/solution.jpg"></a></div>




<?php include('includes/footer.php'); ?>


The output is like this:

a little chaos, I think the include code and the jquery does not work correctly in linux, it does works in windows.

Member Avatar

If you have a look at the view source, you'll see that none of the php has been parsed. So, it seems as though you're running on a server without php or you've got the wrong extension on your file - which is difficult to know as you're using mod_rewriting.

what should I do then, to fix it?

it looks like this page is actually called index.php ( However, looking at your source code aside from the fact that your PHP doesnt seem to be parsed as mentioned by diafol, your HTML markup also has some problems. For example, you didnt include a <head> section to contain the link and js references. In addition, these files dont seem to be located in the correct location because the console is reporting 404 (not found) errors...


The most likely issue for PHP not finding the files is case-sensitive file names on Linux (not sensitive on Windows).