str_ireplace problems.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings!

I'm writing a quick and dirty tool which converts directory paths into
internet friendly paths..

So converting this: C:\PHP
to this: file:\\server01\share\PHP

Everything else works, except this line of code.. Is there some
problem I'm overlooking? My PHP skills are limited to database
manipulation, so string functions other than nl2br are beyond me...

The code I'm using is:

//Remove the drive letter and replace it with a single slash
$step1 = str_ireplace("T:\\", "\\", $_POST['path']);

In context:
//Remove the drive letter and replace it with a single slash
$step1 = str_ireplace("T:\\", "\\", $_POST['path']);
$step2 = "file:\\\\server01\\staffpub".$step1;
$html = "<a href=\"".$step2staff."\">Staff</a><br />";
$result = htmlspecialchars($html);

--
Fare thee well,
Daniel "TheHeadSage" Spain
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
E-mail: theheadsage@xxxxxxxxx
Mob: +61 0407 057 580

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux