vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   make directory (https://vborg.vbsupport.ru/showthread.php?t=95567)

Jolten 09-03-2005 07:43 AM

make directory
 
Hi,

I'm looking for something that can check to see if a directory exists titled $bbuserinfo['username'] and if not create a directory named $bbuserinfo['username'] after the currently browsing user.

I'm okay with php but I've never worked with directories before. At least not creating them. I'm reviewing php.net on it but if someone could give me some helpful tips I'd appreciate it.

The directories will simply store images.

Guest190829 09-03-2005 07:55 AM

Hello,

I'm doing the same thing with vbspace, some functions that may help you are

1.) opendir() - much like fopen, it returns a directory handle

2.) mkdir() - has two parameters, the path to the new directory, and two the permissions it will take.

mkdir is a difficult functions, sometimes I set permissions and I get a completely different permisson. I'm currently trying to figure out exactly what im doing wrong. Hope that helps...

Marco van Herwaarden 09-03-2005 09:32 AM

I think you can also use if_exists() to check if it ....exists. :D

Guest190829 09-03-2005 09:13 PM

You can also test if opendir() returns false, and if it does, run mkdir().

That's how I do it atleast..


All times are GMT. The time now is 05:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01163 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete