I'm building a webapp with Symfony2 and I'm having great difficulty with getting php files to import into my code. I'm simply getting 404 - Not Found errors on the use of the php file. In a nutshell, I'm implementing the Uploadifive file uploader into my app and I have the js and css loading correctly by including them in my base.html.twig, which I extend on different pages within the app.
The uploadifive.php file is in the same folder as the css and js files, but I cannot seem to correctly get the path for it inside my code. I'm sure I'm missing something very simple here, but I cannot fix it :(
upload.html.twig
{% block content %}
<input id="file_upload" type="file" name="file_upload" /> // This works
<script type="text/javascript">
$(function() {
$('#file_upload').uploadifive({
'uploadScript' : '%kernel.root_dir%/Resources/uploadifive/uploadifive.php' // THIS DOES NOT WORK, 404's
// Put your options here
});
});
</script>
{% endblock %}
The files are located in /app/Resources/uploadifive/..
Can anyone help me out?