1
當我運行test.php時,爲什麼總是出現錯誤!class_exists行?!class_exists在magento中不起作用?
這是test.php的:
<?php //test.php
require_once './app/Mage.php';
Mage::app()->setCurrentStore(0);
Mage::setIsDeveloperMode(true);
require_once("test-class.php");
?>
這是測試class.php:
<?php //test-class.php
if (!class_exists("AClass")) {
class AClass {
public function AnAction() {
return 123;
}
}
}
?>