Solved

replace / with \

Posted on 2013-02-04
3
161 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
3 Comments
 
LVL 74

Accepted Solution

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

Open in new window


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

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
Comment Utility
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
Comment Utility
one answer is what I asked for, another provided more information to get to the root directory of the problem
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now