You are here: str_ireplace problems. « PHP « IT news, forums, messages
str_ireplace problems.

Posted by Daniel Spain on 11/02/05 01:59

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@gmail.com
Mob: +61 0407 057 580

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация