Questions tagged [slash]

Please do not use this tag. The / character ("forward slash", or just "slash") is a directory separator in URLs and in many operating systems including Linux (Windows uses \ (backslash) but many applications and APIs also accept /). It is also the division operator in many languages, and marks closing tags in XML/HTML. In some languages, / characters delimit regular expressions.

The slash character / (sometimes called forward slash to distinguish it from \ ) has several common meanings in computing:

  • / is the directory separator in file names on Unix-like and POSIX operating systems, including Linux. Many Windows APIs and applications accept / as a directory (folder) separator, although some require a backslash \ instead. / is also the directory separator in URLs.
  • In many programming languages, / is the division operator . When applied to integers, / returns the quotient of the division in many languages.
  • In SGML based languages including and , / marks closing tags, as in <b>bold</b> or <br />.
  • / is a common delimiter for regular expressions searches (in , , , etc.).
465 questions
0
votes
2 answers

PHP - MySql : (String) put slash between 2 number

I've problem in my code, I use these lines for example: $numb1 = 12; $numb2 = 6; $folder = (string)$numb1."/".$numb2; echo ($folder); // => 12/6 $sql="insert into test (folder) values (".$folder."); // Here the value of folder is "2" !!! //…
Silva
  • 45
  • 1
  • 11
0
votes
1 answer

PHP Puzzler: finding the value of a variable's variable when the variable's value includes a slash

I've been puzzling over this for quite some time, and I'm hoping someone has an idea. Here's the code:
Ben in CA
  • 688
  • 8
  • 22
0
votes
1 answer

Double slash in URL path - bad practice?

My web app generates multiple slashes in URLs like: http://www.example.com/some///slashes. Is it a bad practice? Does Google care? Does Google see /some/slashes and /some///slashes as different URLs? If it does, I think Google won't merge PageRank…
koubic
  • 597
  • 1
  • 11
  • 23
0
votes
0 answers

Symfony2, Trailing slash

i'm facing an issue i don't really know how to solve. I have this route: www.mysite.com/news/{news} On my local machine, i don't have a problem accessing it, but on the live-server a trailing slash gets added, and ofc the route doesn't exist =…
user2515948
0
votes
2 answers

URL Format Query String with /

Is there anyone her who knows how to use slashes as querystring. What I want to do is using the url: http://sample.com/urltest/?id=23423ea342 to appear as http://sample.com/urltest/23423ea342 and handel it onto the Servlets or Struts Action Class
Atul Darne
  • 746
  • 7
  • 14
0
votes
1 answer

android multipart image upload with json object

I want to upload images to server. Here is the code, try { HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost(Constants.yigit); Charset chars = Charset.forName("UTF-8"); // Setting up the encoding …
skhizein
  • 437
  • 1
  • 9
  • 15
0
votes
3 answers

using slash in Perl Command

Below the command i want to run. perl -pi -w -e 's//apps/LIVE/appl/xx/11.5.0//$XXTOP//g;' prog.txt Here, source and replacement both have slashes in them. How to handle this? -- Update I tried with curly braces and tilde that was suggested. perl…
0
votes
3 answers

regex forward slash alpha/numeric

Is it possible to parse a string and where ever there is an alpha on either side of a / drop the / and insert a space, but do not do it to numerics. So "black/teal" would be "black teal" and of course 3/4 stays. I dont know how to start, but do…
cp.
  • 1,241
  • 5
  • 15
  • 26
0
votes
1 answer

Leading '/' while reading a file in Android

My file's actual location in SDcard is : mnt/sdcard/Pictures/Images/IMG_20140127_123605.jpg If I use the same for reading , for example : FileInputStream fis = new FileInputStream("mnt/sdcard/Pictures/Images/IMG_20140127_123605.jpg"); The above…
Monty
  • 17
  • 2
0
votes
1 answer

Extra slash in url after 303 redirect

I'm trying to redirect my website like example.com/anypage to www.example.com/anypage This is what I'm using in my httpd.conf file RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [nocase] RewriteRule ^(.*) http://www.example.com/$1…
Unknown Coder
  • 783
  • 3
  • 12
  • 23
0
votes
1 answer

PHP - forwardslash between main page and subpages

Wondering how to have a forward slash between a main page and its subpages. Current outcome mywebsite.com/page1-subpage.php Desired outcome: mywebsite.com/page1/subpage.php When trying to use a slash in this bit of code gives me an error message:…
James_DG
  • 3
  • 1
  • 6
0
votes
0 answers

python strange date format when reading from a csv file

I try to read some data from many .csv files and store them into arrays to plot them. To be specific there are two arrays. In the first one, I throw in the date and time information. In the original data, this is in the format of Date=2009/07/29…
0
votes
1 answer

weird slash appears in html

As i do some html markup thru php output: echo '

Events Calendar

'; ... a weird slach appears in this way (under Events Calendar and above the html table markup): As i look in debugger i find no hint…
Igor Savinkin
  • 5,669
  • 8
  • 37
  • 69
0
votes
0 answers

Adding class or id to body and dealing with root and trailing slash

I've seen many topics for adding a class or id to body but my issue has to do with the root url, and other urls with a trailing slash. I'm trying to add a unique class or id to body for each page based on the URL, with the option of adding one of…
Ira
  • 87
  • 7
0
votes
1 answer

slash at the end of url removes images when treated as php

I added this line to: /etc/apache2/apache2.conf AddType application/x-httpd-php .php .php3 .php4 .html so it treats my html files as php. But now when I add a slash / after any url, the page comes up without any images.. I asked this question and…
Mike
  • 2,051
  • 4
  • 28
  • 46