PHP3 Introduction Introduction to PHP and web database interfacing with MySQL. PHP3 is an HTML-embedded scripting language allowing web developers to create dynamic, database-driven websites.
| Name: |
Simon Biddle |
| Subject: |
Access/permissions problems using PHP Filesystem functions... |
| Date: |
04-14-2000 06:16AM |
Anyone know how to tell the server your username and password to allow you to modify files through PHP3 Filesystem functions?
I'm trying to run a PHP3 script on my ISPs server, which will create a couple of files there.
The tutorials show how to make user/password type declarations for MySQL:
[code] $db=mysql_connect("localhost", "username", "password");
[/code]
...but I can't see anything similar to allow you to tell your ISP that you have permission to create/modify files.
I am uploading a PHP3 script which has the following call which should create dest.txt alongside source.txt in the same directory the script is (and is being run from):
[code]
copy('source.txt', 'dest.txt');
[/code]
...with the result being:
[result]
Warning: Unable to create 'dest.txt': Permission denied in /home/blah/test/testcopy.php3 on line 27
[/result]
As far as I can tell, all the code is correct - just that I don't have permissions to write (I can ftp there - but the PHP3 can't write there). I have also tried using fopen/fwrite calls with similar response.
Any ideas???
Simon.
|
Other posts in this thread:
| Top | | Access/permissions problems using PHP Filesystem functions... | Simon Biddle | 04-14-2000 06:16AM |
Reply to this post:
|
 |
Visit the PHP Forum!
New On DevShed:
Hot Forum Topics:
|