Phpstudy Background Summary

Source: Internet
Author: User

One, about our sub-page how to use two tables to find out the following effects,

<?php
Require_once (DirName (__file__). ' /include/config.inc.php ');

Correctness of initialization parameter detection
$cid = Empty ($cid)? 2:intval ($CID);
$id = Empty ($id)? 0:intval ($id);
?>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<?php Echo getheader (1, $cid);?>

<link href= "templates/default/style/webstyle.css" type= "Text/css" rel= "stylesheet"/>
<link rel= " Stylesheet "href=" Css/aboutus-honnor.css "type=" Text/css "/>"
<script type= "text/javascript" src= "templates /default/js/jquery.min.js "></SCRIPT>
<script type=" Text/javascript "src=" templates/default/js/ Top.js "></SCRIPT>

<body>
<div class=" into "
<!--header-->
<?php require_once (' header.php ');
<!--/header-->
<div class= "Header-banner";
</div>
<div class= "main";
<div class= "Mode-title";
<p> about us </p>
</div>
<div class= "mode-adress";
<p> your current location: Home > About Us </ P>
</div>
<div class= "about",
</div>
<div class = "Titles";
</div>

<div class= "column" >
<ul>
<!--<?php $dosql->execute ("select * from ' #@__info ', ' #@__infoclass ' WHERE ' #@__infoclass '. parentid=2 and ' #@_ _info '. classid= ' #@__infoclass '. Id ');
while ($row = $dosql->getarray ())
Get link Address
if ($row [' Linkurl ']== ' and $cfg _isreurl!= ' Y ')
$gourl = ' about.php?cid= '. $cid. ' &id= '. $row [' id '];
else if ($cfg _isreurl== ' Y ')
$gourl = ' about-'. $cid. ' -'. $row [' id ']. ' -1.html ';
Else
$gourl = $row [' Linkurl '];

?>--

<?php
$dosql->execute ("select * from ' #@__info ', ' #@__infoclass ' WHERE ' #@__infoclass '. parentid=2 and ' #@_ _info '. classid= ' #@__infoclass '. Id ');
while ($row = $dosql->getarray ())
{
//Get link address
if ($row [' Linkurl ']== ' and $cfg _isreurl!= ' Y ')
$ Gourl = ' about.php?cid= '. $cid. ' &id= '. $row [' id '];
Else if ($cfg _isreurl== ' Y ')
$gourl = ' about-'. $cid. ' -'. $row [' id ']. ' -1.html ';
Else
$gourl = $row [' Linkurl '];
?
<li><a href= "<?php echo $gourl;? > "><?php echo $row [' classname '];? ></a></li>
<?php
}
?
</ul>

</div>
<div class= "Text" >
<?php
if (empty ($id)) {
$row = $dosql->getone ("select* from ' #@__info ' where classid=16");
}else{
$row = $dosql->getone ("select* from ' #@__info ' where classid= $id");
}
?>
<p><?php echo $row [' content '];? ></p>
<!---->
</div>
</div>
<!--footer Start-up
<?php require_once (' footer.php ');?>
<!--footer End--
</body>

Just started to do about our time some do not understand the effect is how to get out, behind the teacher a explain, know to use the database to carry out two tables to check, to achieve the effect.

Two. Get the difference between multiple and get one

Get one: GetOne $row = $dosql->getone ("select * from ' #@__infolist ' WHERE classid=4 and flags like '%h% ' and delstate= ' and Checkinfo=true ORDER by OrderID DESC ");
if (Isset ($row [' ID ']))
{
Get link Address
if ($row [' Linkurl ']== ' and $cfg _isreurl!= ' Y ')
$gourl = ' newsshow.php?cid= '. $row [' ClassID ']. ' &id= '. $row [' id '];
else if ($cfg _isreurl== ' Y ')
$gourl = ' newsshow-'. $row [' ClassID ']. ' -'. $row [' id ']. ' -1.html ';
Else
$gourl = $row [' Linkurl '];

Get more than one: GetArray

<?php $dosql->execute ("select * from ' #@__infolist ' WHERE classid=4 and delstate= ' and flags like '%a% ' and Checkinf O=true ORDER by OrderID ASC LIMIT 0,3 ");
while ($row = $dosql->getarray ())
{
Get link Address
if ($row [' Linkurl ']== ' and $cfg _isreurl!= ' Y ')
$gourl = ' newsshow.php?cid= '. $row [' ClassID ']. ' &id= '. $row [' id '];
else if ($cfg _isreurl== ' Y ')
$gourl = ' newsshow-'. $row [' ClassID ']. ' -'. $row [' id ']. ' -1.html ';
Else
$gourl = $row [' Linkurl '];

if ($row [' Picurl ']!= ')
$picurl = $row [' Picurl '];
Else
$picurl = ' templates/default/images/nofoundpic.gif ';
?>

Two PHP installation environment encountered problem resolution

1, whether to open the Phpstudy,
(When Apache cannot be enabled, consider whether the port is occupied; Workaround: Open phpstudy-> Other Options menu->phpstudy settings, port general settings, change httpd-side
Value in the mouth, click Apply, Reopen Phpstudy), visit the installation or login page URL to http://localhost: Changed value/phpmywind/install/
2, whether to put phpmywind files in the wrong location
(Workaround: Open phpstudy-> Other Options menu, Web site root, paste the Phpmywind file again)
3, the first installation, does not appear the installation page
(please delete the Install_lock.txt file under the Phpmywind/data folder and re-enter the installation URL)

Phpstudy Background Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.