Need Help Getting LiveCode Server to Write to a File
Gregory Lypny
gregory.lypny at videotron.ca
Wed Nov 13 08:56:10 EST 2013
Hello everyone,
I have LiveCode Server working on my Mac. I have a test page that works fine by displaying the date and time in Safari, but I cannot get the script to create and write to a file. When I insert the following line in the script I get an error output to Safari.
put the long time into url “file://HardDrive/Library/WebServer/share/httpd/myData/testFile.txt”
The error message I get is
file "/Library/WebServer/Documents/myServerTest.lc"
row 19, col 28: script: not a command (://)
So, I figured I must be using the wrong syntax for the file path. I tried different combinations of slashes and colons to no avail.
When I change the data to be written from the long time to “Hello world.” I get the following
file "/Library/WebServer/Documents/myServerTest.lc"
row 19, col 14: Expression: bad factor
row 19, col 14: param: bad expression
row 19, col 14: Commands: bad parameter
row 19, col 14: Commands: bad parameters
row 19, col 14: script: bad command
where column 14 is the position of the letter r in the word world. What am I doing wrong? I set read and write permissions (in the Info window) for the share folder, the httpd folder, and the myData folder.
Any advice and perhaps an example would be much appreciated.
Gregory
More information about the use-livecode
mailing list