/    Sign up×
Community /Pin to ProfileBookmark

php and Microsoft Picture It!

My computer tries to open php files with Microsoft Picture It software (which it doesn’t have).

How do I stop it doing this and where should the appropriate program be to open it as a php file. I have downloaded XAPP software but I am all at sea with this stuff.

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 04.2007 — The file needs to be open via the web server, thus you cannot just double-click it. You'll need to (1) save the file within the web documents directory (with XAMPP I believe it's usually "htdocs" under the apache directory) or one of its sub-directories; and then (2) "open" the file by launching your web browser and specifying a URL like: [b]http://localhost/filename.php[/b] or [b]http://localhost/subdirectory/filename.php[/b] .
Copy linkTweet thisAlerts:
@spiresgateauthorMay 05.2007 — Thanks so much for this; I might just about be at the tipping point to get to grips with php. I have located a directory called

C:Program Filesxampphtdocs

and have put my php file in it. However on putting

C:Program Filesxampphtdocs/testphp.php in the browser URL it still wants to open it with the Microsoft Picture It program.

I feel I am nearly there! What's the diference between / and in this context?

Sorry if I appear a bit dense.
Copy linkTweet thisAlerts:
@NogDogMay 05.2007 — Use a URL like I specified in my other reply:
<i>
</i>http://localhost/testphp.php

This will request the file "testphp.php" which is in your local host's (your PC) root web directory (the "htdocs" directory).
Copy linkTweet thisAlerts:
@spiresgateauthorMay 05.2007 — Thanks again for your trouble, but I am still at sea.

Should I enter the URL exactly as you say:

http://localhost/testphp.php

or the following (my file is located at C:/Program Files/xampp/htdocs)

http://Program Files/xampp/htdocs/testphp.php

If I put my file in a web page such as http://www.jpag.org/TESTPHP.php

the browser will read it as html but ignores the php bit.

Does all this depend on a php program being somewhere in my system, but my computer is not finding it (it still tries to open the local file with the Picture It program)

?
Copy linkTweet thisAlerts:
@hastxMay 05.2007 — use [B]http://localhost/testfile.php[/B] from your browser

If you have a php page and the php code is being ignored, it could be that:
[LIST]
  • [*]there is an error in the code that is not being reported

  • [*]or is calling upon a feature or function that is not properly configured

  • [*]or the server is not configured to process php correctly

  • [/LIST]


    I suggest posting the actual code, so someone can help verify it.
    Copy linkTweet thisAlerts:
    @spiresgateauthorMay 05.2007 — This is the code which, on posting on a real web page shows just 'This is spiresgate' and not 'Hello world'

    <html>

    <header>

    <title>Spiresgate Development Site</title>

    <style></style>

    <script></script>

    </header>

    <body>

    <div>This is Spiresgate</div>

    <?php

    echo "Hello World";

    ?>

    </body>

    </html>
    ×

    Success!

    Help @spiresgate spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...