Darkr Posted December 2, 2007 Report Share Posted December 2, 2007 Hi all, just got Uniform Server downloaded and running, very easy indeed. Although I am having a small problem with file_put_contents(). I have created a php page that generates a web site from a xml file... when I ran the script it all went ok, the files were created and could be viewed via localhost. But when I looked in the 'www' folder they didn't exsist. I finally found the files in "C:\Users\Darkr\AppData\Local\VirtualStore\Program Files\Uniform Server\udrive\www" So I have solved the problem, but I would prefer if the files went to uniform server's virtual drive or the install directory. Is this possible? Quote Link to comment Share on other sites More sharing options...
Ric Posted December 2, 2007 Report Share Posted December 2, 2007 I don’t think it’s a UniServer problem!The command will write a file relative to the folder where the script is run.For example if you put this into www name it test1.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Test</title> </head> <body> <h1>Test</h1> <p>Echo will display number of characters in the string "33"</p> <?php echo file_put_contents("test.txt","Pick this file up in www. Testing"); ?> </body> </html> It will create file test.txt in www The only conflict is if you have a file name that is identical to one on the include path. It could be the script that is setting that path! All the bestRic Quote Link to comment Share on other sites More sharing options...
Darkr Posted December 3, 2007 Author Report Share Posted December 3, 2007 Well your right, its definatly not a UniServer problem. I was going to do your example to make sure it wasnt a path problem, when I got to saving the file in Notepad++ i could see the files, but I cannot see the files when going through file manager. I also noticed a 'compatibility files' button on file manager, once clicked it takes me to the folder mentioned previously. So i guess its time to read up on vistas features :/ Thanx for your quick reply Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.