file_put_contents path question

Viewed 33459

I want to create html page using php code form c:\www\test\script\new\creat_html.php to c:\www\test\html\index.html.

Now in c:\www\test\script\new\creat_html.php how do I set the path?

I use dirname(__FILE__), but it just gets the parent path. How to? Thanks.

file_put_contents( dirname(__FILE__) . '/index.html', $html);
2 Answers
Related