show folder name script?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 7effrey
    New Member
    • Feb 2008
    • 12

    show folder name script?

    Hi people

    I'm new to php
    my problem is i want the title of my html page to be shown as the title of the folder it is inside. I know php can do a script like that.

    and my next problem is how do i write the folder name as plain text in html?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You get the foldername and place it within the <title> statement at the top of your page, e.g.
    [php]
    <?php
    echo '<title>'.basen ame(realpath('./')).'</title>';
    ?>
    [/php]

    Ronald

    Comment

    • harshmaul
      Recognized Expert Contributor
      • Jul 2007
      • 490

      #3
      Are you trying to re-write the url?

      theres alot to go through with that your better of skimming through this link...

      http://corz.org/serv/tricks/htaccess2.php

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Originally posted by harshmaul
        Are you trying to re-write the url?

        theres alot to go through with that your better of skimming through this link...

        http://corz.org/serv/tricks/htaccess2.php
        I don't think re-writing url is the question here. It simply wants to display the name of the current folder in the <title> with PHP.

        Ronald

        Comment

        • harshmaul
          Recognized Expert Contributor
          • Jul 2007
          • 490

          #5
          Which is why i asked if 7effery was trying to rewrite, as oposed to offering the solution as rewritting.

          Merly giving 7effery options.

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            Originally posted by harshmaul
            Which is why i asked if 7effery was trying to rewrite, as oposed to offering the solution as rewritting.

            Merly giving 7effery options.
            Ok harshmaul, I understand. Sorry form any misunderstandin g on my part.

            Ronald

            Comment

            • 7effrey
              New Member
              • Feb 2008
              • 12

              #7
              Hi guys

              i have fixet it, just wanna thank you for your help

              Comment

              • ronverdonk
                Recognized Expert Specialist
                • Jul 2006
                • 4259

                #8
                Originally posted by 7effrey
                Hi guys

                i have fixet it, just wanna thank you for your help
                You are most welcome.

                Ronald

                Comment

                Working...