Hi
I have my home directory on my departments server. Somehow I am not
able to write to a file using a php code,
$myFile = "trial3.txt";
$fh = fopen($myFile, "a+") or die("can't open file");
Instead of a+ if i use r or w or anything, it does not work. Could this
be a permission thing? The entire directory had a 777 permission and
even i after i created a file and chmod'ed 777 to it, the code couldnt
open it. What could be the matter? It doesnt go away if i change it to
'w' or 'w+' or 'r' or 'r+'.
Rahul 6 3337
Also I wanted to add that if i write a perl script to write to a file,
it does it for me. But some how that is not possible in php. I gave
write permissions to all the php files and all the text files.
Rahul
rahulthathoo wrote:
Hi
I have my home directory on my departments server. Somehow I am not
able to write to a file using a php code,
$myFile = "trial3.txt";
$fh = fopen($myFile, "a+") or die("can't open file");
Instead of a+ if i use r or w or anything, it does not work. Could this
be a permission thing? The entire directory had a 777 permission and
even i after i created a file and chmod'ed 777 to it, the code couldnt
open it. What could be the matter? It doesnt go away if i change it to
'w' or 'w+' or 'r' or 'r+'.
Rahul
rahulthathoo wrote :
Also I wanted to add that if i write a perl script to write to a file,
it does it for me. But some how that is not possible in php. I gave
write permissions to all the php files and all the text files.
Rahul
rahulthathoo wrote:
>Hi I have my home directory on my departments server. Somehow I am not able to write to a file using a php code, $myFile = "trial3.txt"; $fh = fopen($myFile, "a+") or die("can't open file");
Instead of a+ if i use r or w or anything, it does not work. Could this be a permission thing? The entire directory had a 777 permission and even i after i created a file and chmod'ed 777 to it, the code couldnt open it. What could be the matter? It doesnt go away if i change it to 'w' or 'w+' or 'r' or 'r+'.
Rahul
Did you try running your PHP script in a shell, instead of in a browser?
--
Naixn http://fma-fr.net
No i opened up the php script in the browser. how do i parse it in the
shell?
rahul
naixn wrote:
rahulthathoo wrote :
Also I wanted to add that if i write a perl script to write to a file,
it does it for me. But some how that is not possible in php. I gave
write permissions to all the php files and all the text files.
Rahul
rahulthathoo wrote:
Hi
I have my home directory on my departments server. Somehow I am not
able to write to a file using a php code,
$myFile = "trial3.txt";
$fh = fopen($myFile, "a+") or die("can't open file");
Instead of a+ if i use r or w or anything, it does not work. Could this
be a permission thing? The entire directory had a 777 permission and
even i after i created a file and chmod'ed 777 to it, the code couldnt
open it. What could be the matter? It doesnt go away if i change it to
'w' or 'w+' or 'r' or 'r+'.
Rahul
Did you try running your PHP script in a shell, instead of in a browser?
--
Naixn http://fma-fr.net
rahulthathoo wrote :
No i opened up the php script in the browser. how do i parse it in the
shell?
Symply type :
$php your_file.php
( '$>' being the shell prompt, in case of )
Not too hard, eh? :)
--
Naixn http://fma-fr.net
Alright it works in the shell, but now when i open the url in the
browser. What could be wrong?
Rahul
naixn wrote:
rahulthathoo wrote :
No i opened up the php script in the browser. how do i parse it in the
shell?
Symply type :
$php your_file.php
( '$>' being the shell prompt, in case of )
Not too hard, eh? :)
--
Naixn http://fma-fr.net
I meant not* - it doesnt write the file when i open the url in the
browser
Rahul
rahulthathoo wrote:
Alright it works in the shell, but now when i open the url in the
browser. What could be wrong?
Rahul
naixn wrote:
rahulthathoo wrote :
No i opened up the php script in the browser. how do i parse it in the
shell?
>
Symply type :
$php your_file.php
( '$>' being the shell prompt, in case of )
Not too hard, eh? :)
--
Naixn http://fma-fr.net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Christopher Brandsdal |
last post by:
Hi!
I get an error when I run my code
Is there any other way to get te information from my form?
Heres the error I get and the code beneath.
Line 120 is market with ''''''''''''Line...
|
by: Sanyi |
last post by:
I am having some trouble rereading a file for input. Here's the
problem: I have a text file with some data (football scores) in its
lines. First I read them line-by line to figure out how many...
|
by: CM |
last post by:
Hi there:
I have a web project which can be open and run without problem. I didn't
open the web application for a period and during which I didn't modified any
IIS items, but now I cannot open any...
|
by: CM |
last post by:
Hi there:
I have a web project which can be open and run without problem. I didn't
open the web application for a period and during which I didn't modified any
IIS items, but now I cannot open any...
|
by: CM |
last post by:
Hi there:
I have a web project which can be open and run without problem. I didn't
open the web application for a period and during which I didn't modified any
IIS items, but now I cannot open any...
|
by: vikram |
last post by:
hello all,
I have a small question. I have an application which actually converts
binary data to word document and saves on the server. The next phase of the
project involves opening the word...
|
by: Jay Bienvenu |
last post by:
I cannot create new Web applications in Visual Studio .NET 2003. I
get this error message: "Visual Studio .NET cannot create or open the
application. The likeliest problem is that required...
|
by: Enska |
last post by:
I have problems connecting my access database I get information .. I
cant use my database and I'm administrator on my computer so permission
shutnot bee problem, but I dont know Where is the...
|
by: John Donnell |
last post by:
We have recently added another PC to the network and have run into
difficulty when trying to open access files from the server using the
new box. We get the error message
'MS Access cannot open...
|
by: edfialk |
last post by:
Hi all, I'm desperately trying to get a simple mysql connection
working in php 4.3.9 and I think I have a doozy for you guys. First
of all, I didn't set up ANY of this system, I'm just working...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |