Re: [PHP] Image Upload??

2001-05-15 Thread Toby Dacre


chmod the file or directory so that php can access it

it doesn't run as you!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Search a string between foo/foo

2001-05-09 Thread Toby Dacre

.* in your patten will match everything  It's greedy like perl (unless you
compiled php not to be)

add a ? and it will make it none greedy

^[foo]*   will not work  ^ needs to be in [] to mean not else it means
start of string


Luiz Vitor [EMAIL PROTECTED] wrote in message
011201c0d87d$57f8ab00$[EMAIL PROTECTED]">news:011201c0d87d$57f8ab00$[EMAIL PROTECTED]...
Hi...

I have a text and, some words of the text have the tags url/url between
them.
What i'm trying to do is to replace the word between that tags for a url,
wich I'll search them in a database and convert to a url.

It's working fine when I have only one url/url, but when there are more
than one, the script converts all the text between the first foo/foo and
the last foo/foo.

I'm using this code:

if (eregi(foo(.*)/foo, $string, $result)) {
   $string = str_replace($result[1], 'a
href='.$result[1].''.$result[1].'/a', $string);
}


Someone knows what I have to do to put it to work???


Thanks in advance.

Luiz Vitor
Brazil




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MAX_FILE_SIZE : warning

2001-05-09 Thread Toby Dacre

the problem with doing it on your server (you do it just to be sure though)
is that the user has to wait for the form + file to be sent to your server
before you can respond - this can be very slow


JFL [EMAIL PROTECTED] wrote in message
9davlf$s63$[EMAIL PROTECTED]">news:9davlf$s63$[EMAIL PROTECTED]...
 When I set INPUT TYPE=hidden NAME=MAX_FILE_SIZE VALUE=50 and a
 user uploads a file bigger than 50 my script prints a warning.

 How can I use MAX_FILE_SIZE and avoid that warning so that I can print my
 own error message to the user ?

 :) Jacob
 --
 [ www.eksperten.dk ] Scandinavias biggest IT forum.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]