Log In
Sign Up
Why Join Hot Scripts?
Hot Scripts
All Categories
PHP
Python
Tools & Utilities
XML
Ruby on Rails
Ajax
Web Hosting
ASP
ASP.NET
C & C++
CFML
Flash
Java
JavaScript
CGI & Perl
HTML5
Forums
Blog
Scripts
Hosted Apps
Plugins
Design Templates
Forum
Blog
Advertise
Contact Us
Register
FAQ
Rules
Calendar
Search
Today's Posts
Mark Forums Read
RSS Feeds
Current location:
Hot Scripts Forums
»
Programming Languages
»
PHP
» create files in php
create files in php
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
04-27-04, 06:26 PM
banli
Newbie Coder
Join Date: Feb 2004
Location: on a chair
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
create files in php
how do i create files in php?
im trying to create an auto-forum-installer. I got it to where it creates the dir for the user, as well as mysql stuff.
How do i get it to create a file (like make index.php in /home/suseless/public_html/s1/$username/)?
banli
View Public Profile
Visit banli's homepage!
Find all posts by banli
#
2
(
permalink
)
04-28-04, 02:20 AM
blaw
Junior Code Guru
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hi there,
If you use fopen() to open a file that doesn't exist, PHP will attempt to create that file. You have to have the right permissions, etc. Details can be found here:
http://ca3.php.net/function.fopen
HTH.
__________________
Blavv =|
blaw
View Public Profile
Find all posts by blaw
#
3
(
permalink
)
04-28-04, 09:19 AM
banli
Newbie Coder
Join Date: Feb 2004
Location: on a chair
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
ok, thank you
banli
View Public Profile
Visit banli's homepage!
Find all posts by banli
#
4
(
permalink
)
10-31-08, 10:49 PM
mityelir88
Newbie Coder
Join Date: Oct 2008
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
you could also use the standard touch function.
as in:
touch( "file.txt" );
mityelir88
View Public Profile
Find all posts by mityelir88
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
safe pdo insert and update
|
[SOLVED] SQL statement with array?
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
Off
HTML code is
Off
Trackbacks
are
On
Pingbacks
are
On
Refbacks
are
On
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
General Community
Announcements
Polls
The Lounge
New Members & Introductions
Script Requests
HotScripts.com Discussion
Hot Scripts Forum Questions, Suggestions and Feedback
General HotScripts Site Discussion
HotScripts Site Bug Reports
General Web Coding
HTML/XHTML/XML
HTML5
JavaScript
CSS
Flash & ActionScript
Programming Languages
PHP
Perl
ASP
ASP.NET
C/C++
Visual Basic
Windows .NET Programming
Everything Java
Other Languages
Other Discussions
Web Servers
Database
Other Topics
Web Design
API
Frameworks
AJAX
Security
Server Administration
Portable Device Programming
Cloud Computing
Ruby on Rails
CFML
Python
Tools and Utilities
Remotely Hosted
Web Hosting
Advertising Forums
General Advertisements
Job Offers & Assistance
Traffic Exchange
Website Reviews
Web Hosting Talk
DBForums.com
Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Error when trying to create MySQL table via PHP
HasansWeb
PHP
5
05-19-11
07:59 AM
need to how can we create a tree structure in php
rani
PHP
2
08-29-06
07:12 AM
php files in a cgi-bin directory
epic1231
PHP
7
12-31-03
04:42 PM
Declared Functions
skipper23
PHP
4
12-17-03
11:06 AM
index page not showing up
skipper23
PHP
3
12-15-03
02:10 PM
All times are GMT -5. The time now is
12:07 PM
.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Digg this Thread!
Add Thread to del.icio.us
Bookmark in Technorati
Share on Facebook
Share on Stumble Upon
Share on Twitter