« Home « Chủ đề giáo trình php

Chủ đề : giáo trình php


Có 220+ tài liệu thuộc chủ đề "giáo trình php"

Thiết kế mạng xã hội với PHP - 34

tailieu.vn

public function getFirstPost(). return $this->post;. Set the group this topic should be part of * @param int $group. public function setGroup( $group. $this->group = $group;. Set the creator of the topic * @param int $creator. public function setCreator( $creator. $this->creator = $creator;. Set the name of the topic * @param String $name * @return void. public function setName( $name. $this->name...

Thiết kế mạng xã hội với PHP - 35

tailieu.vn

$this->listPublicGroups( 0. $this->listPublicGroups( intval( $urlBits[1. 'models/group.php');. $group = new Group( $this->registry, 0. $group->setCreator( $this->registry->getObject('authenticate. $group->setName( $this->registry->getObject('db. $group->setDescription( $this->registry->getObject('db. $this->registry->errorPage('Group created', 'Thank you, your new group has been created');. $this->registry->getObject('template')->buildFromTemplates(. <div id="main">. <div id="rightside">. <div id="content">. method="post">. <label for="name">Name</label><br />. <label for="description">Description</label><br />. name="description"></textarea><br />. <label for="type">Type</label><br />. name="type">. <option value="public">Public Group</option>. <option value="private">Private Group</option>. <option value="private-member-invite">Private (Invite Only) Group</option>. <option...

Thiết kế mạng xã hội với PHP - 36

tailieu.vn

'models/groupmembership.php');. $gm = new Groupmembership( $this->registry. $user = $this->registry->getObject('authenticate. $gm->getByUserAndGroup( $user, $this->groupID. if( $this->group->getCreator. $this->createTopic();. $this->viewTopic( intval( $urlBits[3. $this->replyToTopic( intval( $urlBits[3. $this->manageMembership( intval( $urlBits[3. $this->viewGroup();. 'controllers/group/membership.php');. $membership = new Membershipcontroller( $this->registry, $this->groupID. $this->registry->errorPage( 'Group not found', 'Sorry, the group you requested was not found'. $this->registry->errorPage( 'Please login', 'Sorry, you must be logged in to view groups'. $this->group->toTags( 'group_'. $this->registry->getObject('template')->buildFromTemplates(. 'header.tpl.php',...

Thiết kế mạng xã hội với PHP - 37

tailieu.vn

$sql = "SELECT * FROM groups WHERE active=1 AND type <>. 'lib/pagination/pagination.class.php');. $pagination->setQuery( $sql. $pagination->setOffset( $offset. $pagination->setLimit( 20. $pagination->setMethod('cache');. $pagination->generatePagination();. if( $pagination->getNumRowsPage. 'header.tpl.php', 'groups/no-public.tpl.php', 'footer.tpl.php'. 'header.tpl.php', 'groups/public.tpl.php', 'footer.tpl.php'. 'groups', array( 'SQL', $pagination->getCache. 'page_number', $pagination->getCurrentPage(). 'num_pages', $pagination->getNumPages(). if( $pagination->isFirst. 'first', "<a href='groups/'>First page</a>". $pagination- >getCurrentPage. "'>Previous page</a>". if( $pagination->isLast. $pagination->getCurrentPage. "'>Next page</a>". $pagination- >getNumPages. "'>Last page</a>". The template file for this...

Thiết kế mạng xã hội với PHP - 38

tailieu.vn

Some implementations, such as the Twitter API even make it possible to change the format of the data returned, simply by changing a part of the URI.. The API requests are made to specific URIs, which define the resource that the consumer is trying to perform the action (determined by the verbs) upon.. http://ourdomain.com/profiles : To list or create profiles....

Thiết kế mạng xã hội với PHP - 39

tailieu.vn

$registry->getObject('template')->getPage()->addTag( 'siteurl', $registry->getSetting('siteurl'). $registry->getObject('template')-. >buildFromTemplates('header.tpl.php', 'main.tpl.php', 'footer.tpl.php');. $registry->getObject('db')->executeQuery( $controllersSQL. This wasn't a problem initially, because we reset the variable to the active controller after this. The final change is to only add authentication-related template bits to the view, if the active controller isn't API.. $registry->getObject('template')->addTemplateBit('userbar', 'userbar_loggedin.tpl.php');. $registry->getObject('template')->getPage()->addTag( 'username', $registry->getObject('authenticate')->getUser()->getUsername(). $registry->getObject('template')->addTemplateBit('userbar', 'userbar.tpl.php');. '/controller.php');. $controllerInc = $controller.'controller';. $registry->getObject('template')->parseOutput();. print $registry->getObject('template')->getPage. $this->caller =...

Thiết kế mạng xã hội với PHP - 40

tailieu.vn

As well as putting the site online, we need to keep the security and maintenance provisions in mind, to ensure our site stays secure and well maintained should anything go wrong.. There are quite a number of stages to go through to put Dino Space online, so that it can be accessed on the Internet. Choosing and registering a domain...

Thiết kế mạng xã hội với PHP - 41

tailieu.vn

Importing our local database to the hosting account. We now have our database set up and working on the production server!. Changing some of our database records. Most of these should be contained in the settings table, such as the siteurl setting, which at present points to our local installation. We will need to update this record to reflect our...

Thiết kế mạng xã hội với PHP - 42

tailieu.vn

To restore from the backups, all we need to do is browse for the file we wish to restore from, and then click on Upload.. When restoring, any existing database or home directory content will be removed, so only do this if you really need to. If you need to gain access to a specific file that you need to...

Thiết kế mạng xã hội với PHP - 43

tailieu.vn

It is important, however, to not use competing social networking sites to promote our site on, as such promotion is likely to be removed, and does not help our reputation. Sites such as Facebook are large and generic, so provided we are promoting a site such as Dino Space, which is specific and targets a niche market, we would be...

Thiết kế mạng xã hội với PHP - 44

tailieu.vn

One of the most important factors when it comes to the speed, performance, and scalability of our site, is our code. By improving the performance of our code, it consumes fewer resources, allowing us to get more out of our current hardware.. Thankfully, because we have used the Model-View-Controller architecture, our code is already maintainable, extendable, and flexible, which is...

Thiết kế mạng xã hội với PHP - 45

tailieu.vn

about 377 URL 377 123-reg. URL 374 .htaccess file 58. REST 351 RMI 351 RPC 351 SOAP 351. about 377 URL 377. authenticate registry object amending 359, 360 authentication. POST authentication 67 registry object 65, 67 SESSION authentication 68 authentication controller. British Telecom about 9 URL 9. See British Telecom business logic, social networks. British Telecom 9 Dell 9. cloud...

Thiết kế mạng xã hội với PHP - 46

tailieu.vn

creating 63, 64 Download from Wow! eBook <www.wowebook.com>. URL 413 Download from Wow! eBook <www.wowebook.com>. Download from Wow! eBook <www.wowebook.com>. more information, please visit our website: www.packtpub.com. should be sent to [email protected]. core objects Please check www.PacktPub.com for information on our titles Download from Wow! eBook <www.wowebook.com>. each other on your site Please check www.PacktPub.com for information on our titles...

Phát triển web với PHP và MySQL - p 1

tailieu.vn

PHP and MySQL  Web Development. PHP and MySQL Web Development. A Installing PHP 4 and MySQL 781. Why Use PHP and MySQL? ...2. Some of PHP’s Strengths ...3. P ART I Using PHP 7 1 PHP Crash Course 9 Using PHP ...11. Calling Functions ...18. PHP’s Data Types ...22. Operators ...25. Arithmetic Operators ...26. Comparison Operators ...29. Logical Operators...

Phát triển web với PHP và MySQL - p 2

tailieu.vn

Further Reading ...182. Next ...182. Creating the Database ...187. Setting Up Users: The GRANT Command ...188. Setting Up a User for the Web ...193. Using the Right Database ...193. Looking at the Database with SHOW and DESCRIBE ...198. Further Reading ...206. Next ...206. Inserting Data into the Database ...209. Retrieving Data from the Database ...211. Updating Records in the Database...

Phát triển web với PHP và MySQL - p 3

tailieu.vn

P ART VI Appendixes 779 A Installing PHP 4 and MySQL 781 Running PHP as a CGI Interpreter or Module ...782. Installing Apache, PHP, and MySQL Under UNIX ...783. Installing Apache, PHP, and MySQL Under Windows ...793. Laura can be contacted at [email protected]. Luke can be contacted at [email protected]. He is the author of numerous articles about Linux, Apache, PHP,...

Phát triển web với PHP và MySQL - p 4

tailieu.vn

You can download the latest version at any time from http://www.php.net for no charge.. You can write PHP code on the free Unix- like operating systems such as Linux and FreeBSD, commercial Unix versions such as Solaris and IRIX, or on different versions of Microsoft Windows.. You can see the developers’ benchmark page at. 5 01 7842 intro PM Page...

Phát triển web với PHP và MySQL - p 5

tailieu.vn

This is the short style. If you have some problems running this script, it might be because short tags are not enabled in your PHP installation. Each of the following frag- ments of code is equivalent.. <? echo “<p>Order processed. This is the tag style that will be used in this book. It is the default tag that PHP develop-...

Phát triển web với PHP và MySQL - p 6

tailieu.vn

If you want to use the value of a constant, use its name only. For example, to use one of the constants we have just created, we could type:. This will provide a list of PHP’s predefined variables and constants, among other useful infor- mation. We will discuss some of these as we go along.. The term scope refers to...

Phát triển web với PHP và MySQL - p 7

tailieu.vn

<<= >>=. <= >. This is how we can work around the precedence rules when we need to.. By using the parentheses, we can force the sub- expression 1 + $taxrate to be evaluated first.. The innermost set of parentheses will be evaluated first.. These have the following function proto- types. It will determine the type and return a string...