Jason wrote:

Hello all,

I have written a script for the purpose of uploading an image and block of
text for a site. Real simple stuff but I can't get the form to write? code
looks like this...


<?php function is_upload_file($filename) {if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { $tmp_file = dirname(tempnam(",")); } $tmp_file .= '/' . basename($filename); /*User might have trailing slash in php.ini...*/ return (ereg_replace(,/+, '/', $tmp_file ==$filename); } ?>

I have some error checking above this but the meat of it still doesn't work.
I get:

Parse error: parse error in
/var/www/html/site/directory/subdirectory/upload.php on line 68

in the upload.php file there are only 64 or so lines of code.

HELP!

Jason



Jason - here is what I see straight off the bat..

return (ereg_replace(,/+, '/', $tmp_file ==$filename);

should be

return (ereg_replace(,/+, '/', $tmp_file ==$filename));

notice the second parenthesis at the end... i.e. return(ereg_replace())

that could possibly cause it to err out later...

Rolf Brusletto
www.phpExamples.net




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to