View Full Version : A new project/idea
Hypertext
10-02-2008, 09:59 PM
I'm thinking of starting a project, similar to ZedtuGEAR, which looks very nice might I add. I was just thinking about includes and echoing html taking forever, is it possible to do this
<?php
echo include(htmlfile.html);
?>if the html file is like
<html>
<head>
</head>
<body>
</body>
</html>
You know.. the general html file. or would it have to be
<?php
echo "<html>"
echo "<head>" //etc.
?>
??
Zedtu
10-02-2008, 10:08 PM
So you want the PHP code inside of the HTML code to run?
Including just includes the file into the code. Read up on PHP theory.
If you want to execute the PHP code from that you are going to either need to read the file, and get the contents, and do this:
@eval ( '?>' . $page . '<?php ' );
Not just like that.. ;) I wouldn't recommending using eval everywhere either.
Agnostic Bear
10-02-2008, 10:14 PM
So you want the PHP code inside of the HTML code to run?
Including just includes the file into the code. Read up on PHP theory.
If you want to execute the PHP code from that you are going to either need to read the file, and get the contents, and do this:
@eval ( '?>' . $page . '<?php ' );
Not just like that.. ;) I wouldn't recommending using eval everywhere either.
what.... what? I believe you are the one that needs to learn the php theory because just including a file will echo anything that isn't php.
Also @ Reconix:
<?php
include("htmlfile.html");
?>
will work just fine
Zedtu
10-02-2008, 10:24 PM
<?php
echo include("hey.html");
?>And
<?php
echo "<html>";
?>
You don't want to echo it, as its just going to return 1, 0.
I don't see the point in what you are trying to do though.
My bad.
Hypertext
10-02-2008, 10:35 PM
Basically, I hate coding html inside php its so time consuming with all the echos/prints etc. I was wondering if you could simply include a solely html file, inside a php file, the html file without having echos inside.
Zedtu
10-02-2008, 10:37 PM
Still, that would waste time.. not sure how that would benefit the product? Would actually make it harder to understand, and a waste of time :P
QuickScriptz
11-02-2008, 12:42 AM
Well to answer your question simply, the answer is yes. What I would do is make all your files PHP and do the following....
index.php
<?php include('html.php');?>
html.php
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
So, in other words having plain HTML in a PHP file that is being included will just echo out the contents normally, no PHP required in the file being included.
Surprised to see Mythim (i think) in here complaining you typed the word "project" outside of "Web Design Projects".
Good luck with it :)
Hypertext
11-02-2008, 05:07 AM
Ugh, I don't want to climb aboard that boat. ;) You guys are always at eachother. btw awfy, would you consider the font [z] Arista, a drop shadow, a solid glow, and an inner shadow to be copying you, I personally think it's different...
Zedtu
11-02-2008, 12:24 PM
Ugh, I don't want to climb aboard that boat. ;) You guys are always at eachother. btw awfy, would you consider the font [z] Arista, a drop shadow, a solid glow, and an inner shadow to be copying you, I personally think it's different...
Why can't you use your "design skills" to make your own?
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.