PHP mkdir()无效路径

I'm trying to save files on my server, and as a prerequisite, create directories that don't exist.

I am running a script, dl.php, at /home/public_html/www3/scripts/dl.php:

$request['savedir'] = '/home/public_html/www3/scripts/images/logs';
if( !is_dir($request['savedir']) )
    mkdir($request['savedir']);

And I get:

Warning: mkdir(): Invalid path in /home/public_html/www3/scripts/dl.php

The "images" does exist.

Please check your "images" folder owner and permissions. It requires to be write enabled to be used with "apache" user/group when it is executed in browser. The error is actually about "permissions" since it is not visible to "apache" user.

  1. Open the config.php on application/config folder
  2. Browse all the way down to the $config['sess_save_path'] = NULL; line.
  3. Change the NULL value to BASEPATH.'sessions'