Reply to Different slashes for forlders

Your name:

Reply:


Posted by Hello on 05/28/05 20:56

I have a script that I run from my computer's HD when I debug, it requires
this kind of slashes when I run it from HD locally: 'pics\\'.$file

However, when I upload it to my webserver, it needs: 'pics/'.$file

How can I detect what type of a slash I need? I want to to switch
automatically from one slash to another, what function can I use to detect
the right type of a slash to use?

I wrote:

function type_slash(){ if (strpos($_SERVER['DOCUMENT_ROOT'],
'/')===false) return 'pics\\'; else return 'pics/';}
However, is there more elegant solution?

[Back to original 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

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