Ownership - who's that?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Frederick
Forum Newbie
Posts: 13
Joined: Fri Nov 15, 2002 9:42 am

Ownership - who's that?

Post by Frederick »

Im new to PHP so please bare with me, I searched but couldnt find an answer.

I have a simple PHP script that creates a file. The program creates the file with no problem but I noticed that I cant use my edit.php program to make changes and realized that the ownership of the file is '48' and not the domain, what am I doing wrong? Is it that 'W'?

Code: Select all

$fp = fopen("$planfile","w");
                fputs ($fp, "<?php\r\n");
                fputs ($fp, "\$ProfileUsername="$NewUser";\r\n");
		fputs ($fp, "\$ProfileActive="yes";\r\n");
		fputs ($fp, "\$ProfileName="$uName";\r\n");		fputs ($fp, "\$ProfileEmail="$uEmail";\r\n");
		fputs ($fp, "\$ProfileEditPassword="$uPassword";\r\n");               
 fputs ($fp, "?>\r\n");
		fclose ($fp);
MeOnTheW3
Forum Commoner
Posts: 48
Joined: Wed Nov 13, 2002 3:28 pm
Location: Calgary, AB

Post by MeOnTheW3 »

Get a copy of the php manual at php.net.

look up "chown()" and then "chmod()"

48 is the user id of the file owner, to findout that number in php use "fileowner()"

I am on a win32 system and am using the php.chm "windows help" file. Works excellent!
Post Reply