Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PHP File is not on the local disk ?

New Here ,
Jun 20, 2018 Jun 20, 2018

...and then when i click on "get"

Get operation failed since namefile.php does not exist on the remote site.!!

where i set a new dreamweaver site and put all files "html, css ,php,images" in school.file

what is the problem and where ?

one.png

1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 27, 2018 Jun 27, 2018

https://forums.adobe.com/people/Jon+Fritz+II  wrote

try this for the header include, see if either one makes a difference for you...

<?php

include_once("/school/header.php")

?>

or

<?php

include_once("/header.php")

?>

That won't work. PHP includes don't support site-root-relative links. They must be either absolute links or relative links.

I suspect that header.php and footer.php are both in the same folder. So the correct code would be this:

<?php include_once("header.php"); ?>

<?php include_once("footer.ph

...
Translate
Community Expert ,
Jun 20, 2018 Jun 20, 2018

Has namefile.php been uploaded to the server to make it available for download (Get)?

If so, is it within the folder set as your Root Directory under your FTP server settings?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2018 Jun 21, 2018

sorry i am new in use like this programs so please can you give me more explanation about server that you mean ??

and i didn't setup ftp server...

basic.pngadvanced.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2018 Jun 21, 2018

What you have should work for your testing server without issue.

Turn off the automatic upload on save checkbox. That's a somewhat dangerous setting for people new to web design. You should also uncheck the Remote checkbox on the server list screen since you're working with a local testing server.

There's really no need to use "Get" since the files are already on your local machine, you already have them. The Get function is used to download copies of files from a remote server. You're not using a remote server with a hosting company. Currently you are only using a locally installed XAMPP server, a testing server.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2018 Jun 21, 2018

so why its not working ?

i still have the same message !

all.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2018 Jun 21, 2018

Without seeing your code it's hard to say exactly what's going wrong. To make a guess, I'd say the link to a header.php include file is pointing to something that isn't on your hard drive and/or you don't have access to download it.

Check the link that's attempting to pull header.php, it's likely to be part of an include <?php > tag, and make sure it's going to something you have access to locally.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2018 Jun 21, 2018

i setup the code with link include_once ...

code.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2018 Jun 22, 2018

Are short tags enabled on your server and is the server running?

If short tags are not enabled (usually done manually in the php.ini file), the opening brackets of your includes will need to be changed from <? to <?php. The local server must also be running in order for the includes to be parsed.

When the local server is set up as you have it, the links inside include files should be set as site root document relative or absolute. Sometimes document relative links won't work correctly. Site root relative links will start with a leading / followed by your link information. You also might not need the school folder in your link either.

Make sure your server is running, and try this for the header include, see if either one makes a difference for you...

<?php

include_once("school/header.php")

?>

or

<?php

include_once("header.php")

?>

EDIT: Holy caffeine deficiency Batman! Post edited for glaring wrongness.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2018 Jun 22, 2018

i try to change the code as you said but no difference !

how can i setup the local server, maybe that will help me ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2018 Jun 22, 2018

the xampp server needs to be running in the background

gui_en.jpg

also as this setup is a school it is possible their systems | proxy are set to block the port

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2018 Jun 25, 2018

It appears as though your testing server is already set up, here's more info on how to do that if someone else set it up for you...

How to set up a testing server in Dreamweaver

You do need to make sure the server is running in order for it to parse your php though. Look for an icon like this one on your desktop...

...or do a search for XAMPP on your hard drive to find where your server was installed. Right click the icon or the program's .exe file, then right click xampp-control and choose Run As Administrator....

A dialogue window will appear...

...start Apache and then go into DW and open a page. Switching to Live View should use the server and place your header code into your page, if the link in the include is pointing to the right place.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 27, 2018 Jun 27, 2018

https://forums.adobe.com/people/Jon+Fritz+II  wrote

try this for the header include, see if either one makes a difference for you...

<?php

include_once("/school/header.php")

?>

or

<?php

include_once("/header.php")

?>

That won't work. PHP includes don't support site-root-relative links. They must be either absolute links or relative links.

I suspect that header.php and footer.php are both in the same folder. So the correct code would be this:

<?php include_once("header.php"); ?>

<?php include_once("footer.php"); ?>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2018 Jun 27, 2018
LATEST

Lack of coffee is a terrible thing.

I'll edit the post to clear that up.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines