Results 1 to 10 of 10

Thread: PHP - url

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User zombie13's Avatar
    Join Date: Oct:2012
    Location: Bulgaria - Ruse
    Posts: 63

    PHP - url

    index.php. literature literature.php. .
    <li><a href="<?php $_SERVER['DOCUMENT_ROOT'].'index.php'; ?>">INdex</a></li>
    <li><a href="<?php $_SERVER['DOCUMENT_ROOT'].'literature/literature.php'; ?>">Second</a>

    . index.php index.php. literature.php literature.php. 2- footer.php index.php.

  2. #2
    Mire-x
    Join Date: Apr:2005
    Location: Sofia
    Posts: 763
    "echo" , .
    <?php echo $_SERVER...; ?>

    ( PHP 5.4.0 short_open_tag ):
    <?= $_SERVER...; ?>
    (10b) || !(10b)

  3. #3
    Registered User
    Join Date: Dec:2003
    Posts: 2,817
    ,
    Gigabyte DS3P, E4400@9x333, 2x2Gb Super T@1000Mhz, Gigabyte GTX460OC 768Mb

  4. #4
    Registered User zombie13's Avatar
    Join Date: Oct:2012
    Location: Bulgaria - Ruse
    Posts: 63
    <?php echo $_SERVER...; ?> C:/wamp/www/ !
    .

  5. #5
    Registered User
    Join Date: Aug:2009
    Location: ,
    Posts: 191
    , URL...

  6. #6
    Registered User
    Join Date: Nov:2012
    Location:
    Posts: 92
    index.php
    <li><a href="./">INdex</a></li>
    <li><a href="literature/literature.php">Second</a></li>

    literature.php
    <li><a href="../index.php">INdex</a></li>
    <li><a href="./literature">Second</a></li>

    $_SERVER['DOCUMENT_ROOT'] -

    P.S. html

  7. #7
    Registered User zombie13's Avatar
    Join Date: Oct:2012
    Location: Bulgaria - Ruse
    Posts: 63
    Quote Originally Posted by inline View Post
    index.php
    <li><a href="./">INdex</a></li>
    <li><a href="literature/literature.php">Second</a></li>

    literature.php
    <li><a href="../index.php">INdex</a></li>
    <li><a href="./literature">Second</a></li>
    , !

  8. #8
    a.k.a. Bibi Flower's Avatar
    Join Date: Aug:2006
    Location: Sofia, Bulgaria
    Posts: 562
    Code:
    <li><a href="/index.php">INdex</a></li>
    <li><a href="/literature/literature.php">Second</a></li>
    ?

  9. #9
    Registered User
    Join Date: Feb:2015
    Location: Varna
    Posts: 1
    Quote Originally Posted by Flower View Post
    Code:
    <li><a href="/index.php">INdex</a></li>
    <li><a href="/literature/literature.php">Second</a></li>
    ?
    root-relative : http://www.motive.co.nz/glossary/linking.php

    $_SERVER['DOCUMENT_ROOT'] base http://www.w3schools.com/tags/tag_base.asp

  10. #10
    a.k.a. Bibi Flower's Avatar
    Join Date: Aug:2006
    Location: Sofia, Bulgaria
    Posts: 562
    - . /, .
    , DocumentRoot, .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |