TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   php define usage (http://www.talkphp.com/general/4731-php-define-usage.html)

planepixel 07-14-2009 12:59 PM

php define usage
 
Hi i am using define as in example below but it is giving me error about path which is i am replacing. when i do not use define and type path directly in code i.e. "uploads/" everything works fine .what am i doing wrong here?
PHP Code:

define"FILEPATH""/uploads/" ) ;
move_uploaded_file($_FILES['files']['tmp_name'], FILEPATH $_FILES['files']['name']); 


thanks

Salathe 07-14-2009 01:12 PM

Your FILEPATH value starts with a forward slash, so it's an absolute path. It looks like you'll want "./uploads/" to make it relative to the current working directory.

planepixel 07-14-2009 01:31 PM

Thanks. it worked. a single dot is very powerful when we miss it at wrong place.

adamdecaf 07-14-2009 07:18 PM

Quote:

Originally Posted by planepixel (Post 26987)
Thanks. it worked. a single dot is very powerful when we miss it at wrong place.

So are semi-colons; Ha...


All times are GMT. The time now is 02:36 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0