|
 |
|
อยากทราบว่าปัจจุบัน pear html page2 , QuickForm2 , CSS ยังมีความน่าใช้อยู่มั้ย สาเหตุ หรือเพราะอะไรครับ |
|
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2014-12-27 11:39:34 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตัวอย่างการเขียนอ่ะครับ (เน้นพื้นๆก่อน)
<?php
require_once 'HTML/CSS.php';
require_once 'HTML/Page2.php';
require_once 'HTML/QuickForm2.php';
$form=new HTML_QuickForm2('login');
$fieldset=$form->addElement('fieldset')->setLabel('from login');
$user=$fieldset->addElement('text','user',array('size'=>50,'maxlength'=>255))->setLabel('Enter your username:');
$pass=$fieldset->addElement('text','pass',array('size'=>50,'maxlength'=>255))->setLabel('Enter your password:');
$fieldset->addElement('submit', null, array('value' => 'Send!'));
$user->addFilter('trim');
$pass->addFilter('trim');
$user->addRule('required', 'Please enter your username');
$pass->addRule('required', 'Please enter your pass');
$css=new HTML_CSS();
$header='header{width:1080px;height:200px;background:#ABABAB;}';
$aside='aside{width:480px;background:#48E0B3;}';
$css->parseString($header);
$css->parseString($aside);
$page=new HTML_Page2();
$page->setTitle('CMPay.com');
$page->addStyleDeclaration($css,'text/css');
$page->addBodyContent('<header><h1>Logo</h1></header>');
$page->addBodyContent(sprintf('<aside>%s</aside>',$form));
$page->display();
?>

|
 |
 |
 |
 |
Date :
2014-12-27 18:32:51 |
By :
breath678 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|