text = 'Это тот текст, который мы получаем в результате и он содержит в себе Определенная часть текста'
find = 'Определенная часть'
if find in text:
print('True')
if (!isset($conid)) {
function dbconnect() {
$mysql = mysqli_connect('localhost', 'root', ''); // MYSQL_HOST, MYSQL_USER, MYSQL_PASS
mysqli_select_db($mysql, 'makecode'); // MYSQL_BASE
return $mysql;
}
function dbquery($sql) {
$result = mysqli_query(get_conid(), $sql);
return $result;
}
function dbfetcha($result) {
if ($row = mysqli_fetch_assoc($result)) return $row;
else return false;
}
function dbfetch($result) {
if ($row = mysqli_fetch_array($result)) return $row;
else return false;
}
function dbrows($result) {
$num = mysqli_num_rows($result);
return $num;
}
function dbfree($result) {
mysqli_free_result ($result);
}
function dbclose($conid) {
mysqli_close(get_conid());
}
function get_conid() {
static $conid = 0;
if ($conid == 0) $conid = dbconnect();
return $conid;
}
get_conid();
}
<script type="text/javascript">
toastr["error"]("123", "123");
toastr.options = {
"closeButton": true,
"debug": false,
"progressBar": false,
"positionClass": "toast-top-right",
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
}
</script>
.
while True:
fest = open("est.txt", "a")
feng = open("eng.txt", "a")
word1 = input("Sisestage sõna eesti keeles: ")
word2 = input("Sisestage seda sõna inglise keeles: ")
if word1 != "" or word2 != "" or word1 != "" and word2 != "":
word1 = word1.lower()
word2 = word2.lower()
fest.write(word1 + "\n")
feng.write(word2 + "\n")
print("Uued sõnad on lisanud mängule ( EST: " + word1 + ") | ENG: " + word2 +" )")
else:
fest.close()
feng.close()
print("Viga sõnades!")
break
<?php
$author = $my['username'];
$url_res = mysql_query("SELECT * FROM `shorten_url` WHERE `author`='$author'");
while($urls = mysql_fetch_array($url_res)) {
$id = $urls['id'];
if (isset($_POST['delete'])) {
$url_res = ("DELETE FROM `shorten_url` WHERE id='$id'");
$urls = mysql_query($url_res) or die(mysql_error());
echo ' <meta http-equiv="refresh" content="0; url='.$config['url'].'shortener">';
}
echo '
<form method="post" novalidate="novalidate">
<tr>
<td class="text"><a href="'.$urls['short_url'].'">'.$urls['short_url'].'</a><br><small>'.$urls['full_url'].'</small></td>
<td class="text-center">
<div class="btn-group">
<button class="btn btn-xs btn-default" name="delete" title="Удалить"> <i class="fa fa-times"></i> </button>
</div>
</td>
</tr>
</form>
';
}
?>