explode when datadir is not configure, mkdir datadir if not existent
This commit is contained in:
parent
fbf4835ae0
commit
cf5c82d67f
|
@ -4,7 +4,11 @@
|
|||
* in an unique directory with you application, you can just make it return "../data".
|
||||
*/
|
||||
function lassospkit_datadir() {
|
||||
return '/var/lib/spkitlasso/' . $_SERVER['HTTP_HOST'];
|
||||
//return "/home/bdauvergne/public_html/data";
|
||||
// return $_SERVER['DOCUMENT_ROOT'] . '/data';
|
||||
throw new Exception('You need to configure the datadir path');
|
||||
// $path = '/var/lib/spkitlasso/' . $_SERVER['HTTP_HOST'];
|
||||
// $path = "/home/bdauvergne/public_html/data";
|
||||
// $path = $_SERVER['DOCUMENT_ROOT'] . '/data';
|
||||
if (! file_exists($path)) {
|
||||
@mkdir($path,755,1)
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue