468,248 Members | 1,520 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,248 developers. It's quick & easy.

Using wildcard * in php

I am trying to create a link to a jpg file on my php website using a wildcard to return the string to the browser. Here is the function

Expand|Select|Wrap|Line Numbers
  1.   function getUserProfile($userid) {
  2.     if ($userid == SPY_USERID) return NULL;
  3.  
  4.     return('../images/comprofiler/' . $userid . '*' . ".jpg");
  5.  
[Please use CODE tags when posting source code. Thanks! --pbmods]

This returns http://mysite.com/images/comprofiler/63*.jpg

it should return http://mysite.com/images/comprofiler...josfsfj234.jpg

63 is the userid.

Someone please show me the proper sytax for wilcards. Thanks
Jun 17 '07 #1
1 4788
Atli
5,058 Expert 4TB
Where does the text between '63' and '.jpg' come from?
You can't just throw in a wild card sign and expect the code to guess the file name :P
Jun 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Jan Kucera | last post: by
9 posts views Thread by Sreeraj | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.