PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I'm having problems with a command line script's output. I mean, I can't get -fopen- work as I expect (probably beacause I am not aware of some different beaviour in command line) . I mean, when I use
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
you give fopen a relative path. And it's relative to the current working directory.
So your file test.txt should be in the directory printed after working dir: or fopen has failed.
you give fopen a relative path. And it's relative to the current working directory.
So your file test.txt should be in the directory printed after working dir: or fopen has failed.
mmm, so, as long as PHP is called from command line, the "actual" path is the root of PHP installation, whereas when srcipt is executed from browser, the actual path is the script's path... I wouldn't have thought mine was a path problem