Redscrapbook
asked on
HTML5 include text file
I've been using this to fetch .txt through PHP with php code as below and on index.php there is no problem and I've re-saved index.html and I've an issue and text/forgotten.txt no longer appear?
I'm using jQuery1.6.4 and <div> tag on index.html with .txt file as local folder.
I've tried this approach to get "text/forgotten.txt" with php as above and it still doesn't work? I appreciate your pointers please?
I'm using jQuery1.6.4 and <div> tag on index.html with .txt file as local folder.
<?php $filename="text/forgotten.txt"; $handle=fopen($filename,"r"); $contents=fread ($handle,filesize($filename)); echo($contents); ?><!-- Read permission included -->
I've tried this approach to get "text/forgotten.txt" with php as above and it still doesn't work? I appreciate your pointers please?
function showHint(str)
{
if (str.length==0)
{
// Reset hint box if the ID is cleared
jQuery("#lecturer1").html("");
}
else
{
// Require at least two characters before we start searching
if(str.length > 1)
{
// Load hint result into the element with the ID "txtHint"
$('#lecturer1').load("php/studentlist_moduleNo1.php");
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER