Solved

replace / with \

Posted on 2013-02-04
3
166 Views
Last Modified: 2013-02-05
replace
/
with
\

'C:\Mail-Backup\2012\1\2\'

so I can href a local link  

note that the
\
may need to be escaped
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 38853799
$result = str_replace("\\", "/", $original);

Open in new window


http://php.net/manual/en/function.str-replace.php
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 38854750
There is a context-aware, predefined PHP constant for the "right kind" of slash.  It is DIRECTORY_SEPARATOR.
http://php.net/manual/en/dir.constants.php
0
 

Author Closing Comment

by:rgb192
ID: 38856225
one answer is what I asked for, another provided more information to get to the root directory of the problem
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question