Sponsored Content
Top Forums Shell Programming and Scripting Need help in adding missing tag in php pages Post 302960922 by RudiC on Sunday 22nd of November 2015 02:30:37 AM
Old 11-22-2015
You may want to share your sed script to identify where the <?php lead in was removed.

A sed solution for your problem:
Code:
sed '1 {/<?php/b;s/^/<?php/}' file >TMP  && mv TMP file

This User Gave Thanks to RudiC For This Post:
 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Adding a CVS tag to a new file

All, I've been working with perl scripts and shell scripts for quite some time now. I've been making code changes and submitting them into cvs. But I've never created a new file and added it to the directory tree. I know the cvs commands to add it to the directory tree. What I don't know is... (1 Reply)
Discussion started by: rahulrathod
1 Replies

2. Ubuntu

useradd - shell missing features after adding user

Hi, I need to create a user from a bash script so i have to use useradd. The problem is that when i create a user with: useradd -d /home/sample -m sample after i login with that user I have no history in bash, path do not appears, i can't use arrows and so on. When I use adduser everything is... (5 Replies)
Discussion started by: ktm
5 Replies

3. Solaris

Missing man pages on SunOS Rel.5.10

Hello, last week I installed SunOS Release 5.10 on my "new" 220R. Unfortunately there seem to be no man pages, although I installed the End-User software package. Yes I know there are lots of similar topics and I hope you will help me nevertheless. Which further information do you need? ... (6 Replies)
Discussion started by: pseudocoder
6 Replies

4. UNIX for Dummies Questions & Answers

Adding missing lines in file

Dear all, I have a file with two columns - the first column is increasing every 50, the second column is just count (e.g. 5). However, when count is zero, no line is present. Sample: 1950 7 2000 14 2050 7 2100 13 2150 10 2200 9 2250 7 2300 8 2350 7... (1 Reply)
Discussion started by: TheTransporter
1 Replies

5. UNIX for Dummies Questions & Answers

Adding missing lines in file

Dear all, I have a file with two columns - the first column is increasing every 50, the second column is just count (e.g. 5). However, when count is zero, no line is present. Sample: How can I change the file so as to include lines with zero count? e.g. in the previous file to put... (4 Replies)
Discussion started by: TheTransporter
4 Replies

6. Shell Programming and Scripting

Help with missing XML tag

Hello All, I am struggling with many huge XML files with lots of Account details including at least one Membership tag, in that Membership tag one xml tag was missed that is MembershipIdentifier: (There are many Account tags with at least one Membership tag are there in each file) ...... ... (4 Replies)
Discussion started by: VasuKukkapalli
4 Replies

7. What is on Your Mind?

PHP Man Pages Now Available (Over 10,000)

Hello! Yesterday we added over 10,000 PHP man pages to our man page section. I've not yet got our unique and special recursive search feature working; but you can still access the PHP man pages directly by selecting PHP in the man sets drop down menu (left side) and then section 3 (right... (3 Replies)
Discussion started by: Neo
3 Replies
PHAR.INTERCEPTFILEFUNCS(3)						 1						PHAR.INTERCEPTFILEFUNCS(3)

Phar::interceptFileFuncs - instructs phar to intercept fopen, file_get_contents, opendir, and all of the stat-related functions

SYNOPSIS
finalpublicstatic void Phar::interceptFileFuncs (void ) DESCRIPTION
instructs phar to intercept fopen(3), readfile(3), file_get_contents(3), opendir(3), and all of the stat-related functions. If any of these functions is called from within a phar archive with a relative path, the call is modified to access a file within the phar archive. Absolute paths are assumed to be attempts to load external files from the filesystem. This function makes it possible to run PHP applications designed to run off of a hard disk as a phar application. PARAMETERS
No parameters. RETURN VALUES
EXAMPLES
Example #1 A Phar.interceptFileFuncs(3) example <?php Phar::interceptFileFuncs(); include 'phar://' . __FILE__ . '/file.php'; ?> Assuming that this phar is at /path/to/myphar.phar and it contains file.php and file2.txt, if file.php contains this code: Example #2 A Phar.interceptFileFuncs(3) example <?php echo file_get_contents('file2.txt'); ?> Normally PHP would search the current directory for file2.txt, which would translate as the directory of file.php, or the current direc- tory of a command-line user. Phar.interceptFileFuncs(3) instructs PHP to consider the current directory to be phar:///path/to/myphar.phar/ and so opens phar:///path/to/myphar.phar/file2.txt in the above example code. PHP Documentation Group PHAR.INTERCEPTFILEFUNCS(3)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy