fishdish Posted February 1, 2009 Share Posted February 1, 2009 Someone please help me understand WHERE do I find root paths for my website. Not in the script, but the path itself....written out....so I can copy and paste it into the script. I am trying to ask this in a way that makes sense. PLease someone help me. I have been trying for a n answer to this apparently riddle ALL day. Am very tired , very frustrated htmler. Link to comment https://forums.phpfreaks.com/topic/143349-i-really-need-to-have-help-understanding-root-paths/ Share on other sites More sharing options...
corbin Posted February 1, 2009 Share Posted February 1, 2009 I'm not quite sure what you want. Perhaps you want $_SERVER['DOCUMENT_ROOT']. Or, maybe you want getcwd(). Link to comment https://forums.phpfreaks.com/topic/143349-i-really-need-to-have-help-understanding-root-paths/#findComment-751834 Share on other sites More sharing options...
fishdish Posted February 1, 2009 Author Share Posted February 1, 2009 prisimo modded my script earlier to look like this <?php $mp3 = $_GET['mp3']; $file = '//'.$mp3; if(ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off'); } if ( file_exists($_SERVER['DOCUMENT_ROOT'] . "/" . $file) ) { header("Pragma: public"); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: application/mp3"); header('Content-Disposition: attachment; filename="'.$mp3.'"'); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".@filesize($_SERVER['DOCUMENT_ROOT'] . "/" . $file)); set_time_limit(0); @readfile($_SERVER['DOCUMENT_ROOT'] . "/" . $file) OR die("<html><body OnLoad=\"javascript: alert('Unable to read file!');history.back();\" bgcolor=\"#F0F0F0\"></body></html>"); exit; } else { die("<html><body OnLoad=\"javascript: alert('File not found!');history.back();\" bgcolor=\"#F0F0F0\"></body></html>"); } ?> ...but said i needed to change something to something that looked like this....this/is/ my/root But I have no idea what i am supposed to put in this (this/is/ my/root)....i mean what on earth is that really supposed to look like...how do i write out a root path...and how on earth do i know what the root path for my website is? Does that help? Im not sure how to phrase my question. =/ Link to comment https://forums.phpfreaks.com/topic/143349-i-really-need-to-have-help-understanding-root-paths/#findComment-751844 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.