<?php
$fp = new Java("java.io.File", "/home/john/test.txt");
if($fp->exists())
{
echo "The file ". $fp->getAbsolutePath() . " is ".$fp->length(). " bytes"; }
else
{
echo "The file " . $fp->getAbsolutePath() . " does not exist";
}
?>
页面提示:
Fatal error: Class 'Java' not found in D:\workspace\pro rmd\implementation\web\test.php on line 2
什么原因?
你自己写的?
http://www.php.net/manual/en/java.installation.php