search
HomeBackend DevelopmentPHP Tutorialphp module reference, php_PHP tutorial

php module reference, php

<span><span>  1</span> <?<span>php
</span><span>  2</span> <span>//</span><span>数据库连接类</span>
<span>  3</span> <span>class</span><span> ConnDB{
</span><span>  4</span>     
<span>  5</span>     <span>var</span> <span>$dbtype</span><span>;
</span><span>  6</span>     <span>var</span> <span>$host</span><span>;
</span><span>  7</span>     <span>var</span> <span>$user</span><span>;
</span><span>  8</span>     <span>var</span> <span>$pwd</span><span>;
</span><span>  9</span>     <span>var</span> <span>$dbname</span><span>;
</span><span> 10</span>     
<span> 11</span>     <span>//</span><span>构造方法</span>
<span> 12</span>     <span>function</span> ConnDB(<span>$dbtype</span>,<span>$host</span>,<span>$user</span>,<span>$pwd</span>,<span>$dbname</span><span>){
</span><span> 13</span>         <span>$this</span>->dbtype=<span>$dbtype</span><span>;
</span><span> 14</span>         <span>$this</span>->host=<span>$host</span><span>;
</span><span> 15</span>         <span>$this</span>->user=<span>$user</span><span>;
</span><span> 16</span>         <span>$this</span>->pwd=<span>$pwd</span><span>;
</span><span> 17</span>         <span>$this</span>->dbname=<span>$dbname</span><span>;
</span><span> 18</span> <span>    }
</span><span> 19</span> 
<span> 20</span>     <span>//</span><span>实现数据库的连接并返回连接对象</span>
<span> 21</span>     <span>function</span><span> GetConnId(){
</span><span> 22</span>          
<span> 23</span>         <span>if</span>(<span>$this</span>->dbtype=="mysql" || <span>$this</span>->dbtype=="mssql"<span>){
</span><span> 24</span>             <span>$dsn</span>="<span>$this</span>->dbtype:host=<span>$this</span>->host;dbname=<span>$this</span>->dbname"<span>;
</span><span> 25</span>         }<span>else</span><span>{
</span><span> 26</span>             <span>$dsn</span>="<span>$this</span>->dbtype:dbname=<span>$this</span>->dbname"<span>;
</span><span> 27</span> <span>        }    
</span><span> 28</span>         <span>try</span><span> {
</span><span> 29</span>             <span>$conn</span> = <span>new</span> PDO(<span>$dsn</span>, <span>$this</span>->user, <span>$this</span>->pwd);     <span>//</span><span>初始化一个PDO对象,就是创建了数据库连接对象$pdo</span>
<span> 30</span>             <span>$conn</span>->query("set names utf8"<span>);
</span><span> 31</span>             <span>return</span> <span>$conn</span><span>;
</span><span> 32</span>         } <span>catch</span> (PDOException <span>$e</span><span>) {
</span><span> 33</span>             <span>die</span> ("Error!: " . <span>$e</span>->getMessage() . "<br/>"<span>);
</span><span> 34</span> <span>        }
</span><span> 35</span> 
<span> 36</span>          
<span> 37</span> <span>    }    
</span><span> 38</span> <span>}
</span><span> 39</span> 
<span> 40</span> <span>//</span><span>数据库管理类</span>
<span> 41</span> <span>class</span><span> AdminDB{
</span><span> 42</span>     
<span> 43</span>     
<span> 44</span>     <span>function</span> ExecSQL(<span>$sqlstr</span>,<span>$conn</span><span>){
</span><span> 45</span>         
<span> 46</span>         <span>$sqltype</span>=<span>strtolower</span>(<span>substr</span>(<span>trim</span>(<span>$sqlstr</span>),0,6<span>));
</span><span> 47</span>         <span>$rs</span>=<span>$conn</span>->prepare(<span>$sqlstr</span>);        <span>//</span><span>准备查询语句</span>
<span> 48</span>         <span>$rs</span>->execute();                    <span>//</span><span>执行查询语句,并返回结果集</span>
<span> 49</span>         <span>if</span>(<span>$sqltype</span>=="select"<span>){
</span><span> 50</span>             <span>$array</span>=<span>$rs</span>->fetchAll(PDO::FETCH_ASSOC);        <span>//</span><span>获取结果集中的所有数据</span>
<span> 51</span>             <span>if</span>(<span>count</span>(<span>$array</span>)==0 || <span>$rs</span>==<span>false</span><span>)
</span><span> 52</span>                 <span>return</span> <span>false</span><span>;
</span><span> 53</span>             <span>else</span>
<span> 54</span>                 <span>return</span> <span>$array</span><span>;
</span><span> 55</span>         }<span>elseif</span> (<span>$sqltype</span>=="update" || <span>$sqltype</span>=="insert" || <span>$sqltype</span>=="delete"<span>){            
</span><span> 56</span>             <span>if</span>(<span>$rs</span><span>)
</span><span> 57</span>                 <span>return</span> <span>true</span><span>;
</span><span> 58</span>             <span>else</span> 
<span> 59</span>                 <span>return</span> <span>false</span><span>;    
</span><span> 60</span> <span>        }
</span><span> 61</span> <span>    }
</span><span> 62</span> <span>}
</span><span> 63</span> <span>//</span><span>分页类</span>
<span> 64</span> <span>class</span><span> SepPage{
</span><span> 65</span>     <span>var</span> <span>$rs</span><span>;
</span><span> 66</span>     <span>var</span> <span>$pagesize</span><span>;
</span><span> 67</span>     <span>var</span> <span>$nowpage</span><span>;
</span><span> 68</span>     <span>var</span> <span>$array</span><span>;
</span><span> 69</span>     <span>var</span> <span>$conn</span><span>;
</span><span> 70</span>     <span>var</span> <span>$sqlstr</span><span>;
</span><span> 71</span>     <span>function</span> ShowData(<span>$sqlstr</span>,<span>$conn</span>,<span>$pagesize</span>,<span>$nowpage</span>){    <span>//</span><span>定义方法</span>
<span> 72</span>         <span>if</span>(!<span>isset</span>(<span>$nowpage</span>) || <span>$nowpage</span>=="")            <span>//</span><span>判断变量值是否为空</span>
<span> 73</span>             <span>$this</span>->nowpage=1;                        <span>//</span><span>定义每页起始页</span>
<span> 74</span>         <span>else</span>
<span> 75</span>             <span>$this</span>->nowpage=<span>$nowpage</span><span>;
</span><span> 76</span>         <span>$this</span>->pagesize=<span>$pagesize</span>;                    <span>//</span><span>定义每页输出的记录数</span>
<span> 77</span>         <span>$this</span>->conn=<span>$conn</span>;                            <span>//</span><span>连接数据库返回的标识</span>
<span> 78</span>         <span>$this</span>->sqlstr=<span>$sqlstr</span>;                            <span>//</span><span>执行的查询语句</span>
<span> 79</span>         <span>$offset</span>=(<span>$this</span>->nowpage-1)*<span>$this</span>-><span>pagesize;
</span><span> 80</span>         <span>$sql</span>=<span>$this</span>->sqlstr." limit <span>$offset</span>, <span>$this</span>->pagesize"<span>;
</span><span> 81</span>         <span>$result</span>=<span>$this</span>->conn->prepare(<span>$sql</span>);            <span>//</span><span>准备查询语句</span>
<span> 82</span>         <span>$result</span>->execute();                        <span>//</span><span>执行查询语句,并返回结果集</span>
<span> 83</span>         <span>$this</span>-><span>array</span>=<span>$result</span>->fetchAll(PDO::FETCH_ASSOC);        <span>//</span><span>获取结果集中的所有数据</span>
<span> 84</span>         <span>if</span>(<span>count</span>(<span>$this</span>-><span>array</span>)==0 || <span>$this</span>-><span>array</span>==<span>false</span><span>)
</span><span> 85</span>             <span>return</span> <span>false</span><span>;
</span><span> 86</span>         <span>else</span>
<span> 87</span>             <span>return</span> <span>$this</span>-><span>array</span><span>;
</span><span> 88</span> <span>    }
</span><span> 89</span>     
<span> 90</span>     <span>function</span> ShowPage(<span>$contentname</span>,<span>$utits</span>,<span>$anothersearchstr</span>,<span>$anothersearchstrs</span>,<span>$class</span><span>){
</span><span> 91</span>         <span>$str</span>=""<span>;
</span><span> 92</span>         <span>$res</span>=<span>$this</span>->conn->prepare(<span>$this</span>->sqlstr);            <span>//</span><span>准备查询语句</span>
<span> 93</span>         <span>$res</span>->execute();                        <span>//</span><span>执行查询语句,并返回结果集</span>
<span> 94</span>         <span>$this</span>-><span>array</span>=<span>$res</span>->fetchAll(PDO::FETCH_ASSOC);        <span>//</span><span>获取结果集中的所有数据    </span>
<span> 95</span>         <span>$record</span>=<span>count</span>(<span>$this</span>-><span>array</span>);                <span>//</span><span>统计记录总数</span>
<span> 96</span>         
<span> 97</span>         <span>$pagecount</span>=<span>ceil</span>(<span>$record</span>/<span>$this</span>->pagesize);        <span>//</span><span>计算共有几页</span>
<span> 98</span>         <span>$str</span>.=<span>$contentname</span>." ".<span>$record</span>." ".<span>$utits</span>." 每页 ".<span>$this</span>->pagesize." ".<span>$utits</span>." 第 ".<span>$this</span>->nowpage." 页/共 ".<span>$pagecount</span>." 页"<span>;
</span><span> 99</span>         <span>$str</span>.="    "<span>;
</span><span>100</span>         <span>if</span>(<span>$this</span>->nowpage!=1<span>)
</span><span>101</span>             <span>$str</span>.="<a href=".<span>$_SERVER</span>['PHP_SELF']."?page=1&page_type=".<span>$anothersearchstr</span>."&parameter2=".<span>$anothersearchstrs</span>." class=".<span>$class</span>.">首页</a>"<span>;
</span><span>102</span>         <span>else</span>
<span>103</span>             <span>$str</span>.="<font color='#555555'>首页</font>"<span>;
</span><span>104</span>         <span>$str</span>.=" "<span>;
</span><span>105</span>         <span>if</span>(<span>$this</span>->nowpage!=1<span>)
</span><span>106</span>             <span>$str</span>.="<a href=".<span>$_SERVER</span>['PHP_SELF']."?page=".(<span>$this</span>->nowpage-1)."&page_type=".<span>$anothersearchstr</span>."&parameter2=".<span>$anothersearchstrs</span>." class=".<span>$class</span>.">上一页</a>"<span>;
</span><span>107</span>         <span>else</span>
<span>108</span>             <span>$str</span>.="<font color='#555555'>上一页</font>"<span>;
</span><span>109</span>         <span>$str</span>.=" "<span>;    
</span><span>110</span>         <span>if</span>(<span>$this</span>->nowpage!=<span>$pagecount</span><span>)
</span><span>111</span>             <span>$str</span>.="<a href=".<span>$_SERVER</span>['PHP_SELF']."?page=".(<span>$this</span>->nowpage+1)."&page_type=".<span>$anothersearchstr</span>."&parameter2=".<span>$anothersearchstrs</span>." class=".<span>$class</span>.">下一页</a>"<span>;
</span><span>112</span>         <span>else</span>
<span>113</span>             <span>$str</span>.="<font color='#555555'>下一页</font>"<span>;    
</span><span>114</span>         <span>$str</span>.=" "<span>;
</span><span>115</span>         <span>if</span>(<span>$this</span>->nowpage!=<span>$pagecount</span><span>)
</span><span>116</span>             <span>$str</span>.="<a href=".<span>$_SERVER</span>['PHP_SELF']."?page=".<span>$pagecount</span>."&page_type=".<span>$anothersearchstr</span>."&parameter2=".<span>$anothersearchstrs</span>." class=".<span>$class</span>.">尾页</a>"<span>;
</span><span>117</span>         <span>else</span>
<span>118</span>             <span>$str</span>.="<font color='#555555'>尾页</font>"<span>;
</span><span>119</span>         <span>if</span>(<span>count</span>(<span>$this</span>-><span>array</span>)==0 || <span>$this</span>-><span>array</span>==<span>false</span><span>)            
</span><span>120</span>             <span>return</span> "无数据!"<span>;
</span><span>121</span>         <span>else</span>
<span>122</span>             <span>return</span> <span>$str</span><span>;    
</span><span>123</span> <span>    }
</span><span>124</span> <span>}
</span><span>125</span> <span>//</span><span>系统常用方法</span>
<span>126</span> <span>class</span><span> UseFun{
</span><span>127</span>     
<span>128</span>     <span>function</span> UnHtml(<span>$text</span><span>){
</span><span>129</span>        <span>$content</span>=(<span>nl2br</span>(<span>htmlspecialchars</span>(<span>$text</span><span>)));
</span><span>130</span>        <span>$content</span>=<span>str_replace</span>("[strong]","<strong>",<span>$content</span><span>);
</span><span>131</span>        <span>$content</span>=<span>str_replace</span>("[/strong]","</strong>",<span>$content</span><span>);
</span><span>132</span>        <span>$content</span>=<span>str_replace</span>("[em]","<em>",<span>$content</span><span>);
</span><span>133</span>        <span>$content</span>=<span>str_replace</span>("[/em]","</em>",<span>$content</span><span>);
</span><span>134</span>        <span>$content</span>=<span>str_replace</span>("[u]","<u>",<span>$content</span><span>);
</span><span>135</span>        <span>$content</span>=<span>str_replace</span>("[/u]","</u>",<span>$content</span><span>);
</span><span>136</span>     
<span>137</span>     
<span>138</span>        <span>$content</span>=<span>str_replace</span>("[font color=#FF0000]","<font color=#FF0000>",<span>$content</span><span>);
</span><span>139</span>        <span>$content</span>=<span>str_replace</span>("[font color=#00FF00]","<font color=#00FF00>",<span>$content</span><span>);
</span><span>140</span>        <span>$content</span>=<span>str_replace</span>("[font color=#0000FF]","<font color=#0000FF>",<span>$content</span><span>);
</span><span>141</span>     
<span>142</span>        <span>$content</span>=<span>str_replace</span>("[font face=楷体_GB2312]","<font face=楷体_GB2312>",<span>$content</span><span>);
</span><span>143</span>        <span>$content</span>=<span>str_replace</span>("[font face=宋体]","<font face=新宋体>",<span>$content</span><span>);
</span><span>144</span>        <span>$content</span>=<span>str_replace</span>("[font face=隶书]","<font face=隶书>",<span>$content</span><span>);
</span><span>145</span>        <span>$content</span>=<span>str_replace</span>("[/font]","</font>",<span>$content</span><span>);
</span><span>146</span>        <span>//</span><span>$content=str_replace(chr(32)," ",$content);</span>
<span>147</span>        <span>$content</span>=<span>str_replace</span>("[font size=1]","<font size=1>",<span>$content</span><span>);
</span><span>148</span>        <span>$content</span>=<span>str_replace</span>("[font size=2]","<font size=2>",<span>$content</span><span>);
</span><span>149</span>        <span>$content</span>=<span>str_replace</span>("[font size=3]","<font size=3>",<span>$content</span><span>);
</span><span>150</span>        <span>$content</span>=<span>str_replace</span>("[font size=4]","<font size=4>",<span>$content</span><span>);
</span><span>151</span>        <span>$content</span>=<span>str_replace</span>("[font size=5]","<font size=5>",<span>$content</span><span>);
</span><span>152</span>        <span>$content</span>=<span>str_replace</span>("[font size=6]","<font size=6>",<span>$content</span><span>);
</span><span>153</span>        
<span>154</span>        <span>$content</span>=<span>str_replace</span>("[FIELDSET][LEGEND]","<FIELDSET><LEGEND>",<span>$content</span><span>);
</span><span>155</span>        <span>$content</span>=<span>str_replace</span>("[/LEGEND]","</LEGEND>",<span>$content</span><span>);
</span><span>156</span>        <span>$content</span>=<span>str_replace</span>("[/FIELDSET]","</FIELDSET>",<span>$content</span><span>);
</span><span>157</span>        <span>return</span> <span>$content</span><span>;
</span><span>158</span> <span>    }
</span><span>159</span>     
<span>160</span> <span>}
</span><span>161</span> 
<span>162</span> ?></span>

php module reference, php_PHP tutorialSay the php module reference, php_PHP tutorial module .... I php module reference, php_PHP tutorial understand it too well, because of the php module reference, php_PHP tutorialphpphp module reference, php_PHP tutorialphp module reference, php_PHP tutorial module php module reference, php_PHP tutorialphp environment php module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorial concept, the php environment consists of php module reference, php_PHP tutorial multiple modules It consists of modules used by php module reference, php_PHP tutorialphpphp module reference, php_PHP tutorial to implement certain functions, such as php module reference, php_PHP tutorial gd library, which is used to implement image operations.

php module reference, php_PHP tutorial But I think php module reference, php_PHP tutorial said php module reference, php_PHP tutorial php module reference, php_PHP tutorial code blocks, or php module reference, php_PHP tutorial reuse code, look for php classes php module reference, php_PHP tutorialphp module reference, php_PHP tutorial and go to www.phpclasses.org. There are 2 official php module reference, php_PHP tutorial projects, php module reference, php_PHP tutorialphp module reference, php_PHP tutorial is called PEAR, and the other is php module reference, php_PHP tutorialphp module reference, php_PHP tutorial is called PECL, which provides a lot of php module reference, php_PHP tutorial functional support, and php module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorialBrothers php module reference, php_PHP tutorial have already started, I suggest php module reference, php_PHP tutorial take a look at zendframework.

How to use the existing php module? Is it added to the web page?

Message board php module reference, php_PHP tutorial source code copy php module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorialweb directory php module reference, php_PHP tutorial than php module reference, php_PHP tutorialbbs directory php module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorial add php module reference, php_PHP tutorialphp module reference, php_PHP tutorial link php module reference, php_PHP tutorial to the main page php module reference, php_PHP tutorialphp module reference, php_PHP tutorialphp module reference, php_PHP tutorialMessage program php module reference, php_PHP tutorial in the bbs directory php module reference, php_PHP tutorial

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/827940.htmlTechArticlephp module reference, php 1 ? php 2 // Database connection class 3 class ConnDB{ 4 5 var $dbtype; 6 var $host ; 7 var $user ; 8 var $pwd ; 9 var $dbname ; 10 11 //Construction method 12 function C...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Continued Use of PHP: Reasons for Its EnduranceThe Continued Use of PHP: Reasons for Its EnduranceApr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python: Exploring Their Similarities and DifferencesPHP and Python: Exploring Their Similarities and DifferencesApr 19, 2025 am 12:21 AM

PHP and Python are both high-level programming languages ​​that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.