Jump to content

I don't want to escape single quote...


cgm225

Recommended Posts

you can use str_replace, or addslashes,

 

if you want to display an image you shouldn't be using / anyway (thats windows servers only) \ is unix and windows

 

so

echo "C:/public_html/media/photos/thumbnails/";

should work better

 

what are you trying to do ?

$path = addslashes('C:\public_html\media\photos\thumbnails\\');
echo stripslashes($path);

 

Another anti windows!

 

Windows will actually work with back slashes or forward slashes.

 

you have to escape the last slash because it is in front of a quote

Ray

you have to escape the last slash because it is in front of a quote

Ray

 

erm, you should escape all of them

ie /t = tab

$path = addslashes("C:\public_html\media\photos\thumbnails\\");

 

EDIT: Ahh unless you use single quotes, (missed that)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.