Welcome Guest, Not a member yet? Register   Sign In
File Upload Helper - absolute path vs relative path
#2

[eluser]LagniappeInternet[/eluser]
Code:
$relative_url = str_replace ( $_SERVER['DOCUMENT_ROOT'], "" , $uploaded_data[‘file_path’]  )

So if the upload was /www/dev_site/site/mooksrds/public_html/testing/
and the Doc root was /www/dev_site/site/mooksrds/public_html
$relative_url should = /testing/


Messages In This Thread
File Upload Helper - absolute path vs relative path - by El Forum - 01-29-2009, 10:32 PM
File Upload Helper - absolute path vs relative path - by El Forum - 01-29-2009, 11:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB