Thread: Linking in PHP

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Two questions:

    Win2k server, IIS5, php4

    1. I have php script that will show when the page has been last modified. How do I link it on my home page. The link that I am using now does not work. Here is the link:
    <? include("updatepage.php"); ?>

    2. I have a php forum. When I link it this way <a href="xxxxx/index.php"> it brings up the source code. When I link it this way <a href="xxxxxx/"> it brings up the dir. When I link it this way <a href="http://xxx/xxxxx/index.php"> it works. How do I get it to work with this linking <a href="xxxxxx/index.php">

    Thanks
  2. #2
  3. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    Frankly, for a lastmod date, you'd probably find it much easier to just use:

    <?php echo date("l, d F Y: H.i.s", getlastmod()); ?>

    Place that at the bottom of the page..

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    is .php a valid extension for your servers config? that sounds like IIS doesnt know what to do with a .php file and shows it as plain text.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by spiggy:
    is .php a valid extension for your servers config? that sounds like IIS doesnt know what to do with a .php file and shows it as plain text.[/quote]

    I think IIS knows how to handle php because when I give it the full path it works. I followed these steps to in php.

    Installation Notes for IIS 4.0 and 5.0
    --------------------------------------

    - Install the DLLs as mentioned above.
    - If you wish to change any defaults, copy either the php.ini-dist or
    php.ini-optimized files into your Windows directory, and rename it to
    'php.ini'. You can then modify any of the directives inside it.
    - Start the Microsoft Management Console (may appear as
    'Internet Services Manager', either in your Windows NT 4.0 Option Pack
    branch or the Control Panel->Administrative Tools under Windows 2000).
    - Right click on your Web server node (will most probably appear as 'Default
    Web Server'), and select 'Properties'.
    - If you don't want to perform HTTP Authentication using PHP, you can (and
    should) skip this step. Under 'ISAPI Filters', add a new ISAPI filter.
    Use 'PHP' as the filter name, and supply a path to the php4isapi.dll that
    is included in the distribution.
    - Under 'Home Directory', click on the 'Configuration' button. Add a new
    entry to the Application Mappings; Use the path the php4isapi.dll as the
    Executable, supply .php as the extension, leave 'Method exclusions', blank,
    and check the Script engine checkbox.
    - Stop IIS completely (you would have to stop the IIS Administration service
    for that - stopping it through the Management Console isn't good enough;
    You can do it by typing 'net stop iisadmin' on a command prompt).
    - Start IIS again (you can do it by typing 'net start w3svc' on a command
    prompt).
    - Put a .php file under your Web server's document root and check if it works!

    If these is wrong or I missed something, let me know. Thanks

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 11:45 PM
  2. Replies: 4
    Last Post: January 28th, 2004, 09:29 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 02:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 04:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 02:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo