Hello,

Maybe I do not understand the concept behind a constant definition but I have been trying to define a default location for file uploads:

<?php
// Define the upload path
define('UPLOADPATH', 'C:\wamp\www\web\images_files');

Every time I try to run the script:

Notice: Use of undefined constant UPLOADPATH - assumed 'UPLOADPATH' in C:\wamp\www\web\index.php on line 31

I'm not sure what i'm doing wrong here...

do not include C:\ ...........follow the root of your website.

root????\web\images_files\

That is only a notice, not an error. Change your error reporting.

Show line 31. It could be a typo.

or try to change all the "\" by "/";

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.