Jump to content

[SOLVED] setting pc to work like a server.. problems..


jasonc

Recommended Posts

In what file are you saving your php code? All PHP code must be saved in files ending in .php, example filename.php. All files must be saved in WAMP's www folder (eg C:/wamp/www)

 

To run your php scripts you must be going http://localhost

 

Also there is no need to restart your PC when changing PHP settings. Your only need to restart the WAMP services.

Link to comment
Share on other sites

And what does a phpinfo() statement show for the actual short_open_tag setting?

 

it shows 'On'  on both local and master

 

----------

 

yep al files are in the http://localhost/mysite/

 

i have used the include();  in the index.php file and al files i include are .php

 

some files are in a folder...

 

mysite/index.php  main index file

mysite/a_file_to_include.php

mysite/moreincludefiles/include1.php

 

 

 

 

Link to comment
Share on other sites

If you're just looking to essentially serve webpages with PHP/MySQL, just download WAMPServer or XAMPP for Windows.  Both of those programs handle the Apache web server, PHP, MySQL, and some extras.  You'll probably need to  :rtfm:  though.  Its definitely not complicated though, 5 minute setup for both programs.  Keep in mind...

 

"Linux:In a world without walls, who needs Windows?"

Link to comment
Share on other sites

If you're just looking to essentially serve webpages with PHP/MySQL, just download WAMPServer or XAMPP for Windows.  Both of those programs handle the Apache web server, PHP, MySQL, and some extras.  You'll probably need to  :rtfm:  though.  Its definitely not complicated though, 5 minute setup for both programs.  Keep in mind...

 

"Linux:In a world without walls, who needs Windows?"

 

i am using WAMP

 

the INCLUDE(); is not working

 

<?php include("file.php"); ?>

 

or

 

<? include("file.php"); ?>

Link to comment
Share on other sites

my code is not the problem it works on live server.

 

not that it is a secret or anything i just gave an example.

 

to show that neither work

 

i have even created a new site in WAMP and just used a dummy set of files and still nothing is being included.

 

using the <? include("file.php"); ?>

 

or <?php include("file.php"); ?>

 

the file.php has...

<?php

echo("hello");

?>

 

 

in it

 

my index.php file is this...

 

 

<?php

include("file.php");

?>

 

this is the basic example to test that my code is working or not and this basic example is not working anyway

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.