Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 708961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:27:01+00:00 2026-05-14T04:27:01+00:00

How do I echo a forwardslash / ? echo <?php echo $_SERVER[‘HTTP_HOST’] ?> .

  • 0

How do I echo a forwardslash /?

echo <?php echo $_SERVER['HTTP_HOST'] ?> . '/directory/';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:27:01+00:00Added an answer on May 14, 2026 at 4:27 am

    The way you echo a forward slash is like this:

    echo "/";
    

    I think your problem is that you’re opening/closing PHP tags inside what I assume is already a block of php. Change to this:

    <?php
    echo $_SERVER['HTTP_HOST'] . '/directory/';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 532k
  • Answers 532k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The main method does not have any special meaning to… May 17, 2026 at 12:20 am
  • Editorial Team
    Editorial Team added an answer You can also set it in your layout xml using… May 17, 2026 at 12:20 am
  • Editorial Team
    Editorial Team added an answer SELECT STRFTIME('%H', DATETIME(time, 'unixepoch', 'localtime')), COUNT(anotherField) FROM log GROUP BY… May 17, 2026 at 12:20 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

With forms I've always used <form method=post action=<?php echo strip_tags($_SERVER['REQUEST_URI']); ?>> To get my
echo (<div style=\text-align:center\> . include ('file.php') . </div>\n); I'm not sure why, but whenever
When echo ing a boolean (true or false), PHP converts it to 1 or
echo $_POST[name]; //returns the value a user typed into the name field I would
echo timezone_name_from_abbr(, 3600*7, 0); //ok echo timezone_name_from_abbr(, 3600*8, 0); //NOT ok! return nothing! echo
echo date(w,strtotime(date(Y-m-d))); echo date(w,strtotime(date(Y年m月d日))); Save it as utf8.You'll see the second is bigger than
echo -n 'a001~!+rr001~!+1~!+TEST DATA 1' | awk 'BEGIN {FS=~!+} {print $2}' I have the
@echo off SET var1=Yes SET var2=No SET var3=Yes if %var1%==Yes echo Var1 set if
echo empty($location); switch($location){ case (empty($location)): expression 1; break; case ($location%10000==0): expression 2; break; case
echo Point1, a=.$a.\n; echo Point1, b=.$b.\n; if(1<2) { $a = 6; $b['link'] = here;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.