maximum number of dots in a domain name - not a sub-domain name.
for example:
mydomain.com ------ one dot
mydomain.com.au ------ two dots
do you know maximum number of dots in a domain name and could you provide a sample?
thx. (1 Reply)
Point.h
#pragma once
#include <iostream>
using namespace std;
class Point
{
private:
int x;
int y;
public:
Point(void);
Point( int x, int y );
Point( const Point &xPoint );
~Point(void); (0 Replies)
Hi all,
I have files in the filename pattern of,
this.is.the.name.of.my.file.mov
and I would like to remove dots (.) and replace them with spaces ( ) so the output would be,
this is the name of my file.mov
The other issue that I have is that the number of dots (.) in the file... (6 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a script called DOTS that will display the horizontal or vertical number of dots if the first argument... (3 Replies)
I am trying to get the file extension with file names that could contain multiple dots using shell scripting. I want to find a way using the sed command.
Example Filenames:
one.dat
one.dat.002
Results:
dat
I would like to return dat in both instances using the sed command. How can I... (4 Replies)
Hey Guys & Gals !
My script is creating a numbered list and I would like to have the numers and
results spaced apart by a tab.
Now to make sure it is clear which number corresonds with which outcome, I would like to have the tab space filled with dashes.
Anyone able to tell me if this... (6 Replies)
Discussion started by: TAPE
6 Replies
LEARN ABOUT PHP
eval
EVAL(3) 1 EVAL(3)eval - Evaluate a string as PHP codeSYNOPSIS
mixed eval (string $code)
DESCRIPTION
Evaluates the given $code as PHP.
Caution
The eval(3) language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged.
If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user
provided data into it without properly validating it beforehand.
PARAMETERS
o $code
- Valid PHP code to be evaluated. The code mustn't be wrapped in opening and closing PHP tags, i.e. 'echo "Hi!";' must be passed
instead of '<? echo "Hi!"; >'. It is still possible to leave and reenter PHP mode though using the appropriate PHP tags, e.g.
'echo "In PHP mode!"; ?>In HTML mode!<? echo "Back in PHP mode!";'. Apart from that the passed code must be valid PHP. This
includes that all statements must be properly terminated using a semicolon. 'echo "Hi!"' for example will cause a parse error,
whereas 'echo "Hi!";' will work. A return statement will immediately terminate the evaluation of the code. The code will be exe-
cuted in the scope of the code calling eval(3). Thus any variables defined or changed in the eval(3) call will remain visible
after it terminates.
RETURN VALUES eval(3) returns NULL unless return is called in the evaluated code, in which case the value passed to return is returned. If there is a
parse error in the evaluated code, eval(3) returns FALSE and execution of the following code continues normally. It is not possible to
catch a parse error in eval(3) using set_error_handler(3).
EXAMPLES
Example #1
eval(3) example - simple text merge
<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "
";
eval("$str = "$str";");
echo $str. "
";
?>
The above example will output:
This is a $string with my $name in it.
This is a cup with my coffee in it.
NOTES
Note
Because this is a language construct and not a function, it cannot be called using variable functions.
Tip
As with anything that outputs its result directly to the browser, the output-control functions can be used to capture the output of
this function, and save it in a string (for example).
Note
In case of a fatal error in the evaluated code, the whole script exits.
SEE ALSO call_user_func(3).
PHP Documentation Group EVAL(3)