# Site Settings \> Code \> Prefix - Generated Code incorrect?

**URL:** <https://forums.realmacsoftware.com/t/site-settings-code-prefix-generated-code-incorrect/44118>\
**Category:** RapidWeaver Elements\
**Created:** [August 6, 2024, 3:54pm UTC](https://forums.realmacsoftware.com/t/site-settings-code-prefix-generated-code-incorrect/44118 "2024-08-06T15:54:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [August 6, 2024, 3:54pm UTC](https://forums.realmacsoftware.com/t/site-settings-code-prefix-generated-code-incorrect/44118/1 "2024-08-06T15:54:24Z")

</div>

The prefix code generated doesn’t seem to be correct?

I have setup a prefix of:

```auto
<?php
echo basename( __DIR__ );
?>

```

Looking at the resultant publish php file, I am seeing this at the start of the file:

```auto
<!--?php
echo basename( __DIR__ );
?--><!doctype html>
<html lang="en">
 <head> 
...

```

The php code seems to start with **`?-->`** and end with **`-->`**. This cause the php code not to be actioned.

If I edit the published page and correct it, the PHP code displays the folder name for the page as expected.

---

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [August 6, 2024, 4:41pm UTC](https://forums.realmacsoftware.com/t/site-settings-code-prefix-generated-code-incorrect/44118/2 "2024-08-06T16:41:19Z")

</div>

Same applies to PHP code in Custom \> HTML Component \> Template.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [August 6, 2024, 4:53pm UTC](https://forums.realmacsoftware.com/t/site-settings-code-prefix-generated-code-incorrect/44118/3 "2024-08-06T16:53:05Z")

</div>

Yup, I’ve managed to re-create that issue here and we’ll get it fixed 👍
