in http://ez.no/products/ez_publish_...cks/including_php_files_in_templates*
My web is on my local server. how can do it because in the page it is writing :
{"http://www.mydomain.com/myfile.php"|marksPHPinsert}
The path to the file you wish to include must be a url ( http://www.mydomain.com/myfile.php) instead of a local path (e.g. /local/path/to/file.php), because the local file will not be parsed. It will just show unparsed php code (of course).
If script.php is in the same dir as eZ installation you might want to edit the .htacces file.
P.S. And please don't copy-paste just the text of the link in the froum, because the text is shortened with "..." so the link becomes unusable. Copy link location instead.
--
Nothing is impossible. Not if you can imagine it!
BEcause you might have something like this in the .htacces file:
<FilesMatch ".">
order allow,deny
deny from all
</FilesMatch>
<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html))$">
order allow,deny
allow from all
</FilesMatch>
If that's the case (and these lines are not commented) your web server won't let you acces .php files (except index.php) under the directory structure where this .htacces file is located.
There are 2 sollutions:
1. Comment these lines (insecure and not recomended, only for testing)
2. put a .htaccess file with this content:
</code>
<FilesMatch "\.php$">
order allow,deny
allow from all
</FilesMatch> </code>
in the "files" directory.
Hope it works for you.
--
Nothing is impossible. Not if you can imagine it!
{"http://localhost/path/to/script/files/essai.php"|marksPHPinsert} and in the directory "files" I have a .htaccess and a file "essai.php" and in this php 's files there is this code:
<?
echo 'hello'; ?>
When I try to open the template there is a warning:
Fatal error: MAximun execution time of 30 seconde exceeded in C:\ezpublish\lib\ezutlis\classes\ezdebug.php on line 1799
Fatal error:ez Publish did not finish its request
the execution of eZ P was abruptly ended, the debug output is present below.
Well this could be a problem in the extension, so you should probably ask the author or someone who knows how it works about this. You could try:
<?PHP
echo 'hello'; ?>
but I don't think that's the problem. Also try to see what happens when you try to open a regular HTML page (say essai.html) without PHP code in this way.
Yes, also check the permissions on file essai.php.
--
Nothing is impossible. Not if you can imagine it!
thank's for your answer. I have tried with a html files and the result is the same.
on the other hand there is maybe a problem with the permission because I have no change them. But I use ezP on win XP and I am admin. I used to code with linux but my boss obliged me to use win XP and Idon't know very well XP cause I prefer Linux so I don't know how change permissions with winXP but I will look this now .
You must be logged in to post messages in this topic!