Sponsored Content
Full Discussion: ^M in vi with php files
Top Forums UNIX for Advanced & Expert Users ^M in vi with php files Post 302529877 by yazu on Friday 10th of June 2011 11:20:18 PM
Old 06-11-2011
In vi you can do
Code:
:%s/<C-V><C-M>//g

where C-V and C-M are keys you should press on keyboard.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

GD.dll files for php 5.1.6

Hi, I want to create an image dynamically. I used this function. $img_handle = ImageCreate ($length, 10) or die ("Cannot Create image"); It was not creating the image. When i checked in error_log file the error was: PHP Fatal error: Call to undefined function ImageCreate(). ... (0 Replies)
Discussion started by: vanitham
0 Replies

2. Shell Programming and Scripting

[php] ftp get all files from a certain file type

Hi all, I googled for this kind of function but didn't find anything. I have an FTP connection with a server, went to the dir. In this dir there are several TXT files. I would like to have function that downloads all this files, based on their .txt extension. In bash, for example, simply:... (10 Replies)
Discussion started by: laurens
10 Replies

3. Shell Programming and Scripting

PHP script to modify .forward files

Hi. I've been racking my brain on a project I've been working on for work, and hope someone here might be of assistance. Basically I'm trying to create dynamically generated .forward files for users/aliases on my email server. The intent is for these files to be generated automatically any time... (3 Replies)
Discussion started by: adotte
3 Replies

4. Web Development

php files are downloaded

Hello, I have setup Cherokee web server and php 5.2 in Opensolaris zone. Problem is that all .php files are downloaded from web server and not served when I use IP address instead of DNS name in web brovser. Example: test.mydomain.com <-- php works 192.168.0.10/index.php <--... (3 Replies)
Discussion started by: kreno
3 Replies

5. UNIX for Dummies Questions & Answers

Find php files within any matching directory name?

I am trying to search my linux box for any PHP files located within ANY directory matching a certain name. So far nothing I've tried (nor any idea I've searched for) has worked as expected. I have tried a combination of find and grep...fail. Please help? (4 Replies)
Discussion started by: macwise7
4 Replies

6. Shell Programming and Scripting

PHP Script Help - Making links to files Clickable

Ok so I wrote a php script that outputs the below to users on a webpage. # Download: /home/content/d/i/v/divine1234/eBookDownloads/ScalpRemedy_jablaa12734.zip the php code that outputs the above is: echo ("<li>Download: $download_link</li>\n"); The thing is, I dont want... (1 Reply)
Discussion started by: SkySmart
1 Replies

7. Shell Programming and Scripting

finding php, html, htm files

how can i limit the output to only php, html, htm files? i found this as one way find . -regex ".*\(php\|html\|htm\)$" -type f -print0 | xargs -0 grep 'keyword'and it works but is a bit slow is there any faster way? i tried something like this but it doesnt work: find ./ -iname "*.php"... (2 Replies)
Discussion started by: vanessafan99
2 Replies

8. Shell Programming and Scripting

Extract function names and directories from php files

I need a script that extracts function names from php files together with their location (path and file in which they are defined). The php files are located in several directories under a base directory. Ideally the output should be something like: "Path/FileName/FunctionName" for a... (2 Replies)
Discussion started by: bamse
2 Replies

9. UNIX for Dummies Questions & Answers

Deleting from .php files

Hello, I have infected .php files on my server with some code (example at the bottom,code marked red must be deleted, all .php files were infected with this same code). I was wondering how can i delete the first <?php ?> with that all code inside ?:confused: I already tried with : find . -name... (20 Replies)
Discussion started by: Corlex31
20 Replies

10. Web Development

Uploading files via php

I used the following code, which I found on the internet to upload files. <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="upload2.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input... (2 Replies)
Discussion started by: jgt
2 Replies
XDIFF_FILE_MERGE3(3)							 1						      XDIFF_FILE_MERGE3(3)

xdiff_file_merge3 - Merge 3 files into one

SYNOPSIS
mixed xdiff_file_merge3 (string $old_file, string $new_file1, string $new_file2, string $dest) DESCRIPTION
Merges three files into one and stores the result in a file $dest. The $old_file is an original version while $new_file1 and $new_file2 are modified versions of an original. PARAMETERS
o $old_file - Path to the first file. It acts as "old" file. o $new_file1 - Path to the second file. It acts as modified version of $old_file. o $new_file2 - Path to the third file. It acts as modified version of $old_file. o $dest - Path of the resulting file, containing merged changed from both $new_file1 and $new_file2. RETURN VALUES
Returns TRUE if merge was successful, string with rejected chunks if it was not or FALSE if an internal error happened. EXAMPLES
Example #1 xdiff_file_merge3(3) example The following code merges three files into one. <?php $old_version = 'original_script.php'; $fix1 = 'script_with_fix1.php'; $fix2 = 'script_with_fix2.php'; $errors = xdiff_file_merge3($old_version, $fix1, $fix2, 'fixed_script.php'); if (is_string($errors)) { echo "Rejects: "; echo $errors; } ?> SEE ALSO
xdiff_string_merge3(3). PHP Documentation Group XDIFF_FILE_MERGE3(3)
All times are GMT -4. The time now is 09:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy