I don't think what you are trying to do is possible using PHP's include statement. It will not work in this manner.
You can use either the file handling functions of PHP for reading the file content you wish if you want to pass the content into a PHP function or if you are dealing with JavaScript then you can try AJAX for this purpose.
PHP example
PHP Code:
<?php
//File name: file_read.php
$myFile = "test.htm";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
myPHPFunction($theData);
function myPHPFunction($data){
echo $data;
}
?>
Code:
<!-- File name: test.htm -->
<div class="mystyle">
Some text here which will be affected by the function
</div>
Bookmarks