You are here: preg_replace with rawurlencoded? « PHP « IT news, forums, messages
preg_replace with rawurlencoded?

Posted by BlackDex on 03/18/05 18:18

I have a litle problem with replaceing a string in some HTML code.

the html code is:
---
<img width="240" height="180"
src="01%20-%20Raptor%20AMD%20Sempron_image001.jpg">
---

I want to change the "01%20-%20Raptor%20AMD%20Sempron_image001.jpg" becouse
the location of the file will be changed after the upload.

the location for instains will be
"/images/uploaded/01%20-%20Raptor%20AMD%20Sempron_image001.jpg"
After the upload i have moved the image to the right location, and i can
access it trough the browser.

How can replace that string so that it will point to the right location?

I tryed a few preg_replace options, but i doesn't changes it. I think this
is becouse of the urlencoded string.

Does someone has en example?
The filename i get trough the $_FILE['userfile'] variable.

Thx in advance.

 

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

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