PHP Articles

Page 80 of 81

ftp_quit() function in PHP

Samual Sam
Samual Sam
Updated on 30-Jul-2019 148 Views

The ftp_quit() function is an alias to ftp_close(). It closes an FTP connection.Syntaxftp_quit(con);Parameterscon − The connection to close.ReturnThe ftp_quit() function returns TRUE on success or FALSE on failureExampleThe following is an example that login to a connection works in it to change the directory and then the connection is closed −

Read More

ftp_raw() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 109 Views

The ftp_raw() function is used to sends raw command to the FTP server.Syntaxftp_raw(con, command)Parameterscon − The FTP connectioncommand − The command to executeReturnThe ftp_raw() function returns the server's response as an array of strings.ExampleThe following is an example −

Read More

ftp_rawlist() function in PHP

Samual Sam
Samual Sam
Updated on 30-Jul-2019 142 Views

The ftp_rawlist() function displays the list of files with file information from a specified directorySyntaxftp_rawlist(conn,dir,recursive);Parametersconn − The FTP connectiondir − The directory pathrecursive − Sends a "LIST" command to the server by default.ReturnThe ftp_rawlist() function returns an array where each element corresponds to one line of text.ExampleThe following is an example to get a list of files with file information −

Read More

ftp_site() function in PHP

Samual Sam
Samual Sam
Updated on 30-Jul-2019 107 Views

The ftp_site() function sends an FTP SITE command to the FTP server.Syntaxftp_site(conn,command);Parametersconn − The FTP connectioncommand − The SITE command. These commands vary from server to server and used in handling OS specific features such as file permissions and group membership.ReturnThe ftp_site() function returns TRUE on success or FALSE on failure.ExampleThe following is an example −

Read More

ftp_ssl_connect() function in PHP

Samual Sam
Samual Sam
Updated on 30-Jul-2019 374 Views

The ftp_ssl_connect() function opens a secure SSL-FTP connection.Syntaxftp_ssl_connect(host,port,timeout);Parametershost − The FTP server address. Can be a domain address or an IP address.port − The port to connect to. Here the default is 21.timeout − The timeout for network operations.ReturnThe ftp_ssl_connect() function returns a SSL-FTP stream on success or FALSE on error.ExampleThe following is an example −

Read More

ftp_systype() function in PHP

Samual Sam
Samual Sam
Updated on 30-Jul-2019 118 Views

The ftp_systype() function returns the system type identifier of the FTP server.Syntaxftp_systype(con);Parameterscon − The FTP connectionReturnThe ftp_systype() function returns the system type on success, or FALSE on failure.ExampleThe following is an example −

Read More

How to specify Decimal Precision and scale number in MySQL database using PHPMyAdmin?

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 2K+ Views

You need to select a database when you are creating a table. Right now, I have a sample database. The snapshot is as follows:Now you need to give the table name as well as the number of columns you want:After that you need to press Go button. Now, the following section would be visible:The DECIMAL requires two parameter i.e. Total Number of Digit and second one is DigitAfterDecimalPoint.The structure of DECIMAL is as follows:DECIMAL(X, Y)Here, X is TotalNumberOfDigit and Y is DigitAfterDecimalPoint.Let us see an example:DECIMAL(6, 4)Above, we will be having 6 digit sand 2 digit safter decimal point. For ...

Read More

Extract the Day / Month / Year from a Timestamp in PHP MySQL?

Samual Sam
Samual Sam
Updated on 30-Jul-2019 945 Views

To extract the Day/Month/Year from a timestamp, you need to use the date_parse() function. The syntax as follows −print_r(date_parse(“anyTimeStampValue”));The PHP code is as follows −$yourTimeStampValue="2019-02-04 12:56:50"; print_r(date_parse($yourTimeStampValue));The snapshot of PHP code is as follows −The following is the output −Array ( [year] => 2019 [month] => 2 [day] => 4 [hour] => 12 [minute] => 56 [second] => 50 [fraction] => 0 [warning_count] => 0 [warnings] => Array ( ) [error_count] => 0 [errors] => Array ( ) [is_localtime] => )The snapshot of the sample output −

Read More

php_strip_whitespace() function in PHP

Chandu yadav
Chandu yadav
Updated on 30-Jul-2019 144 Views

The php_strip_whitespace() function returns source with stripped comments and whitespace. Syntax php_strip_whitespace(file_path) Parameters file_path − The path of file. Return The php_strip_whitespace() function returns stripped source code on success. Example The above code strip all the comments and whitespace.

Read More

How to pass JavaScript variables to PHP?

Johar Ali
Johar Ali
Updated on 30-Jul-2019 21K+ Views

You can easily get the JavaScript variable value on the same page in PHP. Try the following codeL. var res = "success";

Read More
Showing 791–800 of 801 articles
Advertisements