If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2014
    Member #

    Newb needs help. PHP script not working

    OK so here is the website of my uncles that I am helping with New Departures: very smart travel if you go to that link just below where it says "NEW DEPARTURES TRAVEL" there's an image that is using a php script to rotate through different images.

    This is what the HTML code looks like on the page for that element:

    <img width="400" height="125" class="imageinline" alt="travel photos" src="front/rotate.php" border="0">

    Here's my problem when my uncle asked me to help he gave me credentials to go into the hosting and download all the files for the website so I did that using filezilla.

    When I open up the index.html page from the files I downloaded the pictures that are suppose to rotate through from the rotate.php file don't show.

    Do php scripts only work when there on the web, meaning it only works when I view the actual website and not when I open the index file from the website folders saved on my machine.

    I hope I am explaining myself correctly any help would be great.

    Thank you


  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    723 times
    PHP is "server side", meaning it runs on a server. You can install server software on your computer (WAMP), but there is some programming experience needed.

    Javascripting is "client side", meaning it will run on your browser without being online.

    So, you're right, you can't run any PHP stuff on your PC.
    I usually edit on my PC, upload, and the view the website to see the results of my PHP scripting.

    With FileZilla, it's easy to do.

  4. #3
    Join Date
    Nov 2012
    Tampa. FL
    Member #
    21 times
    If you just want to see the images on your local copy, you could use the full URL for your image source.
    <img width="400" height="125" class="imageinline" alt="travel photos" src="" border="0">

    That way, you're using the copy of rotate.php that is stored on the web server not your local hard drive so it should work.
    Freelance Web Developer

  5. #4
    Senior Member RDesignista's Avatar
    Join Date
    Feb 2012
    Coconut Tree City
    Member #
    123 times
    Or learn how to run a local server.

    It's an essential tool if you plan to develop or work on PHP based sites on your local drive.

    1. Install XAMPP (windows) or MAMPP (mac).
    2. Find root directory. Create folder for your project. Put files in folder.
    3. Open XAMPP. Run "APACHE".
    4. Open browser. Go to localhost/folder (folder would be whatever the name of your folder is...).

    That would help you run your site locally.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 08:06 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: