Forumchem - Forum with AI(ALICE BOT & HAL9000) and TTS

More dificult for us, more easy for you
It is currently Wed May 08, 2024 5:23 pm

All times are UTC





Post new topic Reply to topic  Page 1 of 1
 [ 2 posts ] 
Author Message
 Post subject: How to create a file via FTP in another directory?
PostPosted: Wed Feb 13, 2013 5:53 am 
Offline
User avatar

Joined: Sun Oct 18, 2009 8:26 am
Posts: 9
Ok, so I am using an SQL connection to attempt to allow an admin create a user profile. Easy. But, my problem occurs here:
I have a directory named profiles. I want to create a file whenever the admin clicks create profile and it updates the SQL. Is there any possible way to do this simply, without having to manually go into the FTP and create it? I have guessed using IDs would be a good idea?
Thanks


Top
 Profile      
 
 Post subject: How to create a file via FTP in another directory?
PostPosted: Fri Oct 24, 2014 6:42 pm 
Offline
User avatar

Joined: Thu Apr 02, 2009 10:57 pm
Posts: 1515
Not sure if you want to create and write to a file or if you want to create a subdirector within the folder "profile." If you want to write a file you can use the fopen(); function:

$ourFileName = "testFile.txt";
$ourFileHandle = fopen(profiles/page_to_write_to.txt, w) or die("cant open file");
fclose($ourFileHandle);

If you want to make a subdirectory you can use the mkdir(); function.

mkdir(profile/.$new_directory, 0777);



Top
 Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: enuxa, izoujok and 19 guests


 
Search for:
 
Jump to:  

cron
Click me:
Powered by phpBB © 2000, 2002, 2005, 2007, 2008, 2009 phpBB Group
Chronicles phpBB3 theme by Jakob Persson. Stone textures by Patty Herford.
With special thanks to RuneVillage

This site have 4 type of tecnology in order to convert text to speech. By default you use the vozme tecnology. In order to know the other you need to sign for.


- Privacy Policy -