i am having a very weird and i am sure basic problem. There is a .inc file on the server. I need to add php codes into it. I couldnt change the ext to .php since it was being used by other pages. So i did some research and based on that i added this to my .htaccess
<Files myfilename.inc>
AddType application/x-httpd-php .inc
</Files>
It seems to execute .php codes but there is a problem. I need to use a foreach loop in my code which includes curly brackets. For some reason my notepad(notepad++) shows it as a comment. When i run the code even "echo "1";" doesnt work. Any ideas about that?
My php code:
<div id="install-guides-wrap">
<label for="install-guides">Installation Videos</label>
<select id="install-guides">
<?php
foreach(glob('../files/videos/*.*') as $filename)
{
$name1 = str_replace('../files/videos/', '', $filename);
$ext = pathinfo($name1, PATHINFO_EXTENSION);
$notneeded=".".$ext;
$name = str_replace($notneeded, '', $name1);
echo "<option value='".$name1."'>".$name."</option>"."<br/>";
echo "myname";
echo $name;
}
?>
</select>
<a class="btn-download" title="Download this file!" href="">DOWNLOAD</a>
</div>