File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 2929*/
3030
3131
32- $ path = realpath (dirname (__FILE__ )) . '/.. ' ;
33- $ iface_path = realpath (dirname (__FILE__ )) . '/../../interface/web ' ;
32+ $ path = realpath (dirname (__FILE__ ) . '/.. ' );
33+ $ iface_path = realpath (dirname (__FILE__ ) . '/../../interface/web ' );
34+ $ iface_base_path = realpath (dirname (__FILE__ ) . '/../../interface ' );
3435
3536require $ path . '/lib/mysql_clientdb.conf ' ;
3637
5556
5657if ($ cont == '' ) die ('No users found ' . "\n" );
5758
58- if (file_exists ($ iface_path . '/.htpasswd ' )) rename ($ iface_path . '/.htpasswd ' , $ iface_path . '/.htpasswd.old ' );
59- file_put_contents ($ iface_path . '/.htpasswd ' , $ cont );
60- chmod ($ iface_path . '/.htpasswd ' , 0644 );
59+ if (file_exists ($ iface_base_path . '/.htpasswd ' )) rename ($ iface_base_path . '/.htpasswd ' , $ iface_base_path . '/.htpasswd.old ' );
60+ file_put_contents ($ iface_base_path . '/.htpasswd ' , $ cont );
61+ chmod ($ iface_base_path . '/.htpasswd ' , 0644 );
6162
6263$ cont = 'AuthType Basic
6364AuthName "Login"
64- AuthUserFile ' . $ iface_path . '/.htpasswd
65+ AuthUserFile ' . $ iface_base_path . '/.htpasswd
6566require valid-user ' ;
6667
6768if (file_exists ($ iface_path . '/.htaccess ' )) rename ($ iface_path . '/.htaccess ' , $ iface_path . '/.htaccess.old ' );
You can’t perform that action at this time.
0 commit comments