Basically, I have this PHP upload script I created. The user logs in and username/password is verified from a phpBB database. Once the user logs in, there's an IF statement seeing if a directory of the same name as the username exists. If it doesn't exist, it creates the directory. In other words, if it's the user's first time logging in, the following directory will be created:
http://mydomain/upload/$username with $username obviously being the real username. Well, now that I'm using CGI, the upload directory is already pre-set in the CGI script in my CGI-BIN. Here is the partial script:
Code: Select all
package XUploadConfig;
BEGIN
{
use Exporter;
@XUploadConfig::ISA = qw( Exporter );
@XUploadConfig::EXPORT = qw( $c );
}
our $c=
{
# Directory for temporary using files
temp_dir => '/upload/temp',
# Directory for uploaded files
target_dir => '/upload/uploads',package XUploadConfig;
Code: Select all
BEGIN
{
use Exporter;
@XUploadConfig::ISA = qw( Exporter );
@XUploadConfig::EXPORT = qw( $c );
}
our $c=
{
# Directory for temporary using files
temp_dir => '/upload/temp',
# Directory for uploaded files
target_dir => '/upload/$username',