Showing posts with label txt. Show all posts
Showing posts with label txt. Show all posts

Monday, 15 February 2016

How to Write to a Remote File in PHPIn Feburary 2016 15,

In Feburary 2016 15,
Open your PHP file in a text editor, such as Windows Notepad.
Connect to a remote FTP server. Open a file with the 'fopen(address, mode)' command. The mode needs to be set to 'w' for writing. For example, '$my_file = fopen ('ftp://ftp.myserver.com/myfile.txt', w);' will anonymously connect you to the ftp server and create a new file called 'myfile.txt' that you can write to. To use a non-anonymous account, change the address to use the format 'ftp://username:password@ftp.myserver.com/file'.
Write data to the file using the 'fwrite(handle, string);' command. For example, 'fwrite ($my_file, 'my text');'.
Close your connection once you are done writing to the file with the 'fclose(handle);' command. For example, 'fclose($my_file);'. Once executed, the new file will now have been written to and saved on the remote server.
Save the PHP file.
In Feburary 2016 15,

Sunday, 14 February 2016

How to Find a File in CentosIn Feburary 2016 14,

In Feburary 2016 14,
Click on the button 'terminal' on the CentOS desktop to open the Linux command prompt window.
Type the command 'find -name tables.txt' and press 'Enter' to start searching a file. In this example, you search the file 'tables.txt.'
Use an asterisk (
) in the file name as a wild-card character to search for multiple files or if you do not know the exact name. For example, the command 'find -n tables.
' finds all files with the name 'tables' and any extension such as files 'tables.txt', 'tables.doc' or tables.xls.'
Read the command output that is the list of found files with the full directory path. If no files are found, the command produces no output.
In Feburary 2016 14,