You are here: Re: interpret string as path « PHP Programming Language « IT news, forums, messages
Re: interpret string as path

Posted by Mike Placentra II on 09/29/37 12:00

On Jan 16, 9:23 am, jonsoons <jonso...@gmail.com> wrote:
> I have a file of paths to fonts like this:
> /var/lib/defoma/fontconfig.d/U/URWBookmanL-LighItal.pfb
> I read these into an array then I want php to open each font as a
> resource.
> php does not see the string as a path. What can I do to convert these
> to paths?
>
> Thanks

Do you mean a file resource like this?

##################
$fontpaths = array();
//...populate $fontpaths
$fonts = array();
foreach( $fontpaths as $fontpath )
$fonts[$fontpath] = fopen( $fontpath, 'r' );
##################

PHP does not "see the string as a path." The function or construct you
pass it to just uses it as a path, but until then its just another
string.

What are you trying, and what happened that you know it didn't work?

-Michael Placentra II | ZCE

 

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

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