0

I've got problems after I moved my files in a structered directory list (I used relative links in all files).

A quick overview:

www
  js
    functions.js
  php
    ajax.send.php       include ('./functions.php');
    ajax.delete.php     include ('./functions.php');
    functions.php
  other dirs that have no influence
  index.php             include ('./php/functions.php'); and ofc js embedding <script type="text/javascript" src="./js/functions.js"></script>

The ajax stuff on the startpage works, but the php functions within ajax.send.php and ajax.delete.php aren't working correctly (but the path is correct?!) I've tried every possible path in theses two files but there's no way to get this stuff to work.

Have I missed something? I'm at the end of my rope.

Greetings Fabio

4

2 回答 2

0

最好使用绝对路径。尝试使用这种结构:

ajax.send.php       include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php';
index.php           include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'functions.php';
于 2012-10-06T08:35:18.767 回答
0

你能试试吗

ajax.send.php       include ('./php/functions.php');
ajax.delete.php     include ('./php/functions.php');
于 2012-10-06T08:01:14.563 回答