I know by default you can not use an absolute path when using fopen and mkdir, but in my case I really need to specify the exact location of the files/directories. I KNOW there must be some workaround way to do this... does anyone know how? For example, here is what I am using now: $path = "../../logs/".date("Y")."/".date("m"); $filename = date("M.d.Y").".txt"; $openfile = fopen($path."/".$filename, 'a'); fwrite($openfile, $logcontent); fclose($openfile); PHP: This is working, but I need to do something like: $path = "http://www.mydomain.com/logs/".date("Y")."/".date("m"); PHP: ANY help would be greatly appreciated!!
i think that you really need to specify the path... you cannot access the raw file or the dir if you are using http://, clarify your thoughts on using http or https, its a request to the server, and gives you a html response. it will not show up like you opened an windows explorer or what ever. all http/s are CLIENT response. you can use it under.
you can not use fwrite with an URL path "http://xxx.com/file.php" you can use fwrite with absolute physical path of the file .. e.g. "/home/www/file.php" or relative path to the script like "../file.php". If you would able to do what you want to do.. imagine that everybody could alter everybody's files in the world... which is not normal. I hope this helps