Hello,
I Coded a file which create new file on the same folder running on localhost ( the php file)
but the probleme that there is no created file on the folder ! i tried with permission but with no result ..
give me you ideals
Hello,
I Coded a file which create new file on the same folder running on localhost ( the php file)
but the probleme that there is no created file on the folder ! i tried with permission but with no result ..
give me you ideals
up up up
Please wait 24 hours before bumping a thread.
When you do so, please be somewhat less insistent.
This is a forum populated by volunteers.
Please read The Forum Rules and The Forum Posting Guidelines
A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
This universe is crazy. I'm going back to my own.
Sorry, but your comment is not very specific. You created a script? (php script?) which you put somewhere (where?) and attempt to execute the php how?
Perhaps you could post the code...
Linux User #415691 Ubuntu User #8629
Iowa Team (LoCo): [Wiki] [Launchpad]
IRC channel: #ubuntu-us-ia on irc.freenode.net
the php script :
when i run it on the localhost it's supposed to create a file named "myText.txt" in the same patch , but there is notPHP Code:
<?php
$content = "some text here";
$fp = fopen("myText.txt","wb");
fwrite($fp,$content);
fclose($fp);
?>
PS : i use ubuntu 12.04
i tried to change the patch permission and nothing happend the sema with the file :/
If you're running the script through localhost, I assume you are using a web server like Apache.
The server runs with the permissions of the user www-data, which has no permission to write files anywhere outside /tmp.
Enter a full file path in fopen(), like "/tmp/myTest.txt" and see if that works. /tmp can be written to by any user. If that works, then you need to decide where you want these files stored and grant write permissions to the www-data to that directory.
Also, you should always check the contents of /var/log/apache2/error.log to see if something went wrong.
Last edited by SeijiSensei; April 19th, 2014 at 12:27 PM.
If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.
Blog · Linode System Administration Guides · Android Apps for Ubuntu Users
Bookmarks