Hi, I have the following code :
$_fp = fopen("/home/dh2240/mgt/index.php", "a+") or die(); $_contents = fread($_fp,filesize("/home/dh2240/mgt/index.php")); fclose ($_fp); //Menu elements $_sme = strpos("$_contents","sub_menu_elements"); echo "sme = $_sme<p>"; ... It should display somthing like "sme = 850", after finding the string in the specified file. Under windows, this script works fine (except replacing the "/home/dh2240/mgt/index.php" by "c:/apache/htdocs/mgt/index.php")... it seems that the file index.php cannot be opened under linux... The file is chmod 777, along with the directory /mgt, and the files identical, but still no luck... The fopen does not die(), but it does not seem to read any data from the file... I'm confused, and not sure how to check what is happening... Anyone got any ideas ? Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php