diff options
author | xue <> | 2006-04-02 00:34:32 +0000 |
---|---|---|
committer | xue <> | 2006-04-02 00:34:32 +0000 |
commit | 87aaba0aa45ea3ead27966923fa5702817731e7d (patch) | |
tree | 9faf6bc41bdbceb9ce3381d465f0b48fdbc979c3 /demos/helloworld | |
parent | 2f36ce50b85cf0d02174464356e6636d14f4c19a (diff) |
Added hello world demo.
Diffstat (limited to 'demos/helloworld')
-rw-r--r-- | demos/helloworld/index.php | 18 | ||||
-rw-r--r-- | demos/helloworld/protected/.htaccess | 1 | ||||
-rw-r--r-- | demos/helloworld/protected/pages/Home.page | 16 | ||||
-rw-r--r-- | demos/helloworld/protected/pages/Home.php | 11 |
4 files changed, 46 insertions, 0 deletions
diff --git a/demos/helloworld/index.php b/demos/helloworld/index.php new file mode 100644 index 00000000..43c0b436 --- /dev/null +++ b/demos/helloworld/index.php @@ -0,0 +1,18 @@ +<?php
+
+$basePath=dirname(__FILE__);
+$frameworkPath=$basePath.'/../../framework/prado.php';
+$assetsPath=$basePath.'/assets';
+$runtimePath=$basePath.'/protected/runtime';
+
+if(!is_writable($assetsPath))
+ die("Please make sure that the directory $assetsPath is writable by Web server process.");
+if(!is_writable($runtimePath))
+ die("Please make sure that the directory $runtimePath is writable by Web server process.");
+
+require_once($frameworkPath);
+
+$application=new TApplication;
+$application->run();
+
+?>
\ No newline at end of file diff --git a/demos/helloworld/protected/.htaccess b/demos/helloworld/protected/.htaccess new file mode 100644 index 00000000..e0198322 --- /dev/null +++ b/demos/helloworld/protected/.htaccess @@ -0,0 +1 @@ +deny from all
diff --git a/demos/helloworld/protected/pages/Home.page b/demos/helloworld/protected/pages/Home.page new file mode 100644 index 00000000..97702e67 --- /dev/null +++ b/demos/helloworld/protected/pages/Home.page @@ -0,0 +1,16 @@ +<html>
+
+<head>
+<title>Hello World Demo - Prado</title>
+</head>
+
+<body>
+
+<com:TForm>
+
+<com:TButton Text="Click me" OnClick="buttonClicked" />
+
+</com:TForm>
+
+</body>
+</html>
\ No newline at end of file diff --git a/demos/helloworld/protected/pages/Home.php b/demos/helloworld/protected/pages/Home.php new file mode 100644 index 00000000..432c2ee7 --- /dev/null +++ b/demos/helloworld/protected/pages/Home.php @@ -0,0 +1,11 @@ +<?php
+
+class Home extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $sender->Text="Hello World!";
+ }
+}
+
+?>
\ No newline at end of file |