This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
blog:spring2016:cjann:journal [2016/05/02 16:25] – [April 27th 2016] cjann | blog:spring2016:cjann:journal [2016/05/02 17:44] (current) – [May 2nd 2016] cjann | ||
---|---|---|---|
Line 697: | Line 697: | ||
====May 2nd 2016==== | ====May 2nd 2016==== | ||
+ | |||
+ | Well, half of my dream has been realized. I've successfully used openssl encryption to encrypt a string and output it to an existing file. Using all the same output functions previously covered: open_sslencrypt and file_put_contents. As it stands, the new string overtires the old. If one were so inclined there is probably a constant or different method that appends new text after the text that was previously there. | ||
+ | |||
+ | Yep, after looking at the documentation there is a parameter constant that can be used to append data to the file instead of overwriting it (the documentation calls it a " | ||
+ | |||
+ | Interestingly, | ||
+ | |||
+ | I did throw down some quick php code in windows to test fopen outside of our unix environment. I wasn't able to use php to create a file because of write permissions. So I whipped up some fast code to create a file with fopen and dump some plain text into it. There must be something more to writing and interpreting php code in windows. When I use the file address in the address bar of a browser all I see is a text version of the file. No output file is created. | ||
+ | |||
+ | I did attempt to use the command here http:// | ||
+ | To execute the code from the command line. I got the error message " | ||
+ | |||
+ | Well obviously there' | ||
+ | |||
+ | I'll have to attempt to install required PHP tools when I get home. | ||
+ | |||
+ | Also, I may have potentially found a solution to my file permissions issue. There is a PHP function that changes the chmod values of a file! So, potentially, |