示例#1
0
 public function evidStr(MyString $tempString, MyString $tempString2, $arr)
 {
     if (strpos($tempString->getString(), $tempString2->getString()) > -1) {
         $strSecondo = new MyString("<b>" . $tempString2->getString() . "</b>");
         $arr[1] = $strSecondo;
     }
     return $arr;
 }
示例#2
0
 /**
  * @return void
  */
 public function testing()
 {
     $this->Client = new Client();
     $this->Text = new Text();
     $this->CustomText = new MyString();
     $result = Text::foo();
     $customResult = MyString::foo();
     $result = CustomHttpSocket::foo();
 }
示例#3
0
    {
        return myStringLength($this->string);
    }
    //reverse function
    function MyStrRev()
    {
        return strRevFunction($this->string);
    }
    //lower to upper
    function MyToUpperCase()
    {
        return lowerToUpper($this->string);
    }
    //upper to lower
    function MyToLowerCase()
    {
        return upperToLower($this->string);
    }
    //my explode function
    function MyExplode()
    {
        return myExplode($this->string);
    }
}
$myString = new MyString();
$myString->string = "sanjida rafin";
echo "String length is: " . $myString->MyStrLen() . "<br>";
echo "String reverse is: " . $myString->MyStrRev() . "<br>";
echo "String lower case is: " . $myString->MyToUpperCase() . "<br>";
echo "String upper case is: " . $myString->MyToLowerCase() . "<br>";
print_r($myString->MyExplode());
示例#4
0
<?php

include "C:/xampp/htdocs/Training/PHP/functions.php";
class MyString
{
    public $string;
    function MyStrLen()
    {
        return myStringLength($this->string);
    }
}
$myString = new MyString();
$myString->string = "sanjida";
echo "string length is : " . $myString->MyStrLen();
<?php

include "C:/xampp/htdocs/Training/PHP/functions.php";
class MyString
{
    public $string;
    function MyToLowerCase()
    {
        return upperToLower($this->string);
    }
}
$myString = new MyString();
$myString->string = "sanJiDa";
echo "string length is : " . $myString->MyToLowerCase();
示例#6
0
<html>
dividi stringa: <br />
<form method = "get">
	dividi:<input name="dividi" type="text" size="5"></input>
	testo da dividere: <input name="testo" type="text" size="5"></input>
	<input type="submit" value="value"/>
</form>
</html>

<?php 
include "esercizio2.php";
$s = new MyString($_GET["testo"]);
$stringadivisa = $s->dividi($_GET["dividi"]);
echo $stringadivisa[0];
echo $stringadivisa[1] . "<br>" . "stringa evidenzia:" . $_GET["dividi"] . "</br>";
echo $s->evidenzia($_GET["dividi"]);
<?php

include "C:/xampp/htdocs/Training/PHP/functions.php";
class MyString
{
    public $string;
    function MyToUpperCase()
    {
        return lowerToUpper($this->string);
    }
}
$myString = new MyString();
$myString->string = "sanjida";
echo "string lower to upper case is : " . $myString->MyToUpperCase();
示例#8
0
文件: dz.php 项目: echmaster/data
<?php

require_once getenv("DOCUMENT_ROOT") . "/lib/config.php";
require_once "ArrayString.php";
$arr = array(3, 5, 8, 7, -5, 9);
$string = "Hello man";
MyArray::length($arr);
MyString::length($string);
示例#9
0
 public static function WifiLogOff($membership, $wifi_service_name, $wifi_session_time, $wifi_logoff_url, $aam_param_array)
 {
     $res_wifi_state = false;
     //请求AAM Log记录在事务之前开启
     $wifiAamRequest = new WifiAamRequest();
     $start_time = time();
     $wifiAamRequest->request_time = $start_time;
     $wifiAamRequest->request_url = $wifi_logoff_url;
     $call_back_xml = MyString::curl_file_get_contents($wifi_logoff_url, 15);
     $end_time = time();
     $wifiAamRequest->membership_id = $membership->member_id;
     $wifiAamRequest->membership_code = $membership->member_code;
     $wifiAamRequest->response_time = $end_time;
     $wifiAamRequest->use_time = $end_time - $start_time;
     $wifiAamRequest->response_parameter = $call_back_xml;
     if (!empty($call_back_xml)) {
         $xml = new SimpleXMLElement($call_back_xml);
         $error_code = trim($xml->errcode);
         if ('0' == $error_code) {
             $res_wifi_state = '1';
         } elseif ('1' == $error_code) {
             $res_wifi_state = '2';
         }
         $wifiAamRequest->request_state = 0;
     } else {
         $wifiAamRequest->request_state = 1;
     }
     $wifiAamRequest->save();
     return $res_wifi_state;
 }
示例#10
0
<?php

include "C:/xampp/htdocs/Training/PHP/functions.php";
class MyString
{
    public $string;
    function MyStrRev()
    {
        return strRevFunction($this->string);
    }
}
$myString = new MyString();
$myString->string = "sanjida";
echo "string reverse is : " . $myString->MyStrRev();
示例#11
0
<?php

include "C:/xampp/htdocs/Training/PHP/functions.php";
class MyString
{
    public $string;
    function myExplode()
    {
        return myExplode($this->string);
    }
}
$mystring = new MyString();
$mystring->string = "sanjida rafin";
print_r($mystring->myExplode());
示例#12
0
		
		<input type="text" name="input1" />
		<input type="number" name="input2" />
		
		<br />
		
		<br />
		
		<input type="text" name="input3" />
		
		<input type="submit" value="Ribalta" />
		
		<?php 
include "classString.php";
if (isset($_POST["input1"]) && isset($_POST["input2"])) {
    $string1 = new MyString($_POST["input1"]);
    echo "<br /><br />";
    echo "String : ";
    $string1->stampString();
    echo "  ";
    $num1 = $_POST["input2"];
    echo "Numero : {$num1}";
    echo "<br /><br />";
}
?>
		
	</form>
	
</html>

<?php